This website requires JavaScript.
Explore
Help
Sign In
darkhelm
/
notifications-admin
Watch
1
Star
0
Fork
0
You've already forked notifications-admin
mirror of
https://github.com/GSA/notifications-admin.git
synced
2026-02-06 03:13:42 -05:00
Code
Issues
Packages
Projects
Releases
Wiki
Activity
Files
df9efb38d43ed7174e5b2b29432a4bf18a7a2f13
notifications-admin
/
tests
/
javascripts
/
support
/
teardown.js
7 lines
79 B
JavaScript
Raw
Normal View
History
Unescape
Escape
Move setup/teardown out of tests
2019-05-21 10:56:38 +01:00
window
.
jQuery
=
null
;
$
=
null
;
delete
window
.
GOVUK
;
Restore all mocked values after tests In response to [1]. This prevents mocked values leaking between tests [2]. I did try to set 'mockRestore: true' in jest.config, but that means the restore happens before _every_ test, which isn't what we want. [1]: https://github.com/alphagov/notifications-admin/pull/3878#discussion_r631060116 [2]: https://jestjs.io/docs/jest-object#jestrestoreallmocks
2021-05-12 17:36:04 +01:00
jest
.
restoreAllMocks
(
)
;
Reference in New Issue
Copy Permalink