Closed MariusBaci closed 8 years ago
Certainly any code in the scope of the "describe" will only run once for all tests within it, just like "before". You may want to define it inside "beforeEach"?
This is a thing common to most test frameworks in most languages. It's the same in ruby's rspec, for example, unless you're using the "let" constructs.
Sorry about that, it was an error in my code, I used expect.restoreSpies() instead of spy.restore(). The framework works fine. Thank you for the prompt answer.
They seem to work only with the first 'it', as from the second on, the call is made to the original function, and not to the spy.
Is this how it's implemented (to only work if they are placed in the 'beforeEach' or 'it'), or is this an issue ?