From c367a01c8dcc7e1c8d67e77a398d0abfcfedd1d8 Mon Sep 17 00:00:00 2001 From: Vanita Barrett Date: Tue, 27 Jul 2021 10:28:26 +0100 Subject: [PATCH] Set jest testURL to https://design-system.service.gov.uk Without this config, the default URL is 'localhost' which causes some issues when setting cookies because of a bug in tough-cookie which treats localhost like a public domain. Because you can't set cookies on a public domain, cookies were not being set in the tests. Setting the testURL to a real URL fixes this issue. @lfdebrux has raised an issue with tough-cookie here: https://github.com/salesforce/tough-cookie/issues/215 --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 439d946e65..9b8cfb6299 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,8 @@ "preset": "jest-puppeteer", "setupFilesAfterEnv": [ "./jest.setup.js" - ] + ], + "testURL": "https://design-system.service.gov.uk" }, "browserslist": [ "last 2 versions",