diff --git a/package.json b/package.json index c967f67d96..6e3ef960d6 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,9 @@ ] }, "jest": { - "setupTestFrameworkScriptFile": "./config/jest-setup.js", + "setupFilesAfterEnv": [ + "./config/jest-setup.js" + ], "snapshotSerializers": [ "jest-serializer-html" ], diff --git a/src/all.test.js b/src/all.test.js index c5529d4407..6e2c1834b1 100644 --- a/src/all.test.js +++ b/src/all.test.js @@ -39,7 +39,7 @@ afterAll(async (done) => { }) describe('GOV.UK Frontend', () => { - describe('javascript', async () => { + describe('javascript', () => { it('can be accessed via `GOVUKFrontend`', async () => { await page.goto(baseUrl + '/', { waitUntil: 'load' }) @@ -113,7 +113,7 @@ describe('GOV.UK Frontend', () => { await page.waitForSelector('#conditional-scoped-1', { hidden: false }) }) }) - describe('global styles', async () => { + describe('global styles', () => { it('are disabled by default', async () => { const sass = ` @import "all"; diff --git a/src/components/error-summary/error-summary.test.js b/src/components/error-summary/error-summary.test.js index 175671956d..57b861b282 100644 --- a/src/components/error-summary/error-summary.test.js +++ b/src/components/error-summary/error-summary.test.js @@ -43,7 +43,7 @@ describe('Error Summary', () => { ['a conditionally revealed input', 'yes-input', '#test-conditional-reveal legend'] ] - describe.each(inputTypes)('when linking to %s', async (_, inputId, legendOrLabelSelector) => { + describe.each(inputTypes)('when linking to %s', (_, inputId, legendOrLabelSelector) => { beforeAll(async () => { await page.goto(`${baseUrl}/examples/error-summary`, { waitUntil: 'load' }) await page.click(`.govuk-error-summary a[href="#${inputId}"]`)