Wednesday, 29 July 2020

How to unit test private object variables mocha chai for typescript project?

After researching this I found the best response would be to test the private variables of an object against the prototype of the object. Effectively then inside the test creating a prototype and accessing the variables in that way. When I do this, however, it seems that all variables are not null but are undefined. How am I able to test the private variables, so that they remain defined? For reference, this is what I'm doing now:https://stackoverflow.com/questions/63162403/how-to-unit-test-private-variables-mocha-chai-for-typescript-project

Submitted July 29, 2020 at 10:11PM by e_n_v

No comments:

Post a Comment