Logo
Explore Help
Sign In
darkhelm/notifications-admin
1
0
Fork 0
You've already forked notifications-admin
mirror of https://github.com/GSA/notifications-admin.git synced 2026-07-21 00:23:53 -04:00
Code Issues Packages Projects Releases Wiki Activity
Files
f803bf468f77edf0e430ed2a1eb17de27d2e9429
notifications-admin/tests/javascripts/support/teardown.js

7 lines
79 B
JavaScript
Raw Normal View History

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
Powered by Gitea Version: 1.25.0 Page: 1404ms Template: 30ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API