Spy a function
Here is the following scenario:
What does the yourName()
function contain? The unit test will be the following:
With the spy()
method, we can test the contents of the function (first parameter). The testing.variable()
method is used to retrieve the value of a local variable.
Last updated