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
I consider jest's partial test isolation to be more trouble than it's worth and would rather switch to jest-light-runner, don't mess around with globals (expect with jest.spyOn) and use the built-in jest features to revert these changes after every test.
However, it seems that the resetMocks and restoreMocks config option no longer works with jest-light-runner (probably a separate bug), so I tried working around that using a custom setup script (with setupFilesAfterEnv).
Actual behavior
But it seems that beforeAll, beforeEach, afterEach, afterAll simply do nothing when called from such a script, for example:
Hi there, thanks for the great project!
I consider jest's partial test isolation to be more trouble than it's worth and would rather switch to
jest-light-runner
, don't mess around with globals (expect withjest.spyOn
) and use the built-in jest features to revert these changes after every test.However, it seems that the resetMocks and restoreMocks config option no longer works with
jest-light-runner
(probably a separate bug), so I tried working around that using a custom setup script (with setupFilesAfterEnv).Actual behavior
But it seems that
beforeAll
,beforeEach
,afterEach
,afterAll
simply do nothing when called from such a script, for example:setup-after-env.js
:demo.test.js
:With
jest-light-runner
, this only prints:edit: Here's a minimal reproduction repo
Expected behavior
The text was updated successfully, but these errors were encountered: