Console output during testing shows at the beginning that the server is instantiated 4 times, each one corresponding to a call to clear. It is then followed by all the tests, which means the clear('../../server/server') is not performed before each test but once at the beginning.
The proposed fix is to use a beforeEach directive in test-setup.js, that clears the require cache.
Or, on a per-test-file basis in case this doesn't work either
Actually this is a mistake on my side, I made a revert changes of the initial PR #64 , while I should have simply make some more commits directly to #64
I'm cancelling this one
Reverts Overdrivr/micro-ci#64
Console output during testing shows at the beginning that the server is instantiated 4 times, each one corresponding to a call to clear. It is then followed by all the tests, which means the
clear('../../server/server')
is not performed before each test but once at the beginning.The proposed fix is to use a
beforeEach
directive intest-setup.js
, that clears the require cache. Or, on a per-test-file basis in case this doesn't work either