You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per #160, it is technically possible to run code with the environment set to test even if the code isn't actually being run by Mocha. This causes a reference error for code which attempts to use after.
While that isn't the way the codebase is intended to be used, one possible way of making the code more robust is to use capability sniffing:
Maybe. If we switched to e.g. Jest we would just change the name of the function, which isn't so onerous because for example Jest uses afterAll – so we'd have to change some code anyway. And I like the centralization this might yield, if we share the function in the multiple places we register after hooks.
As per #160, it is technically possible to run code with the environment set to
test
even if the code isn't actually being run by Mocha. This causes a reference error for code which attempts to useafter
.While that isn't the way the codebase is intended to be used, one possible way of making the code more robust is to use capability sniffing:
I'm not 100% sure I prefer this – it is safer, but perhaps less clear.
The text was updated successfully, but these errors were encountered: