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-18 21:44:11 -04:00
Code Issues Packages Projects Releases Wiki Activity
Files
fa0d1e20d1913b6f8bac85d870a282fc2b9968a2
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: 972ms Template: 31ms
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