Move setup/teardown out of tests

This commit is contained in:
Tom Byers
2019-05-21 10:56:38 +01:00
committed by Chris Hill-Scott
parent 435334ba9c
commit 0131f0c1b1
8 changed files with 18 additions and 41 deletions

View File

@@ -1,13 +1,6 @@
const helpers = require('./support/helpers');
beforeAll(() => {
// set up jQuery
window.jQuery = require('jquery');
$ = window.jQuery;
// load module code
require('govuk_frontend_toolkit/javascripts/govuk/modules.js');
// TODO: remove this when tests for sticky JS are written
require('../../app/assets/javascripts/stick-to-window-when-scrolling.js');
@@ -15,10 +8,7 @@ beforeAll(() => {
});
afterAll(() => {
window.jQuery = null;
$ = null;
delete window.GOVUK;
require('./support/teardown.js');
});