diff --git a/tests/javascripts/authenticateSecurityKey.test.js b/tests/javascripts/authenticateSecurityKey.test.js index c2e778334..110314325 100644 --- a/tests/javascripts/authenticateSecurityKey.test.js +++ b/tests/javascripts/authenticateSecurityKey.test.js @@ -99,6 +99,9 @@ describe('Authenticate with security key', () => { }); test('authenticates and passes a redirect url through to the authenticate admin endpoint', (done) => { + // https://github.com/facebook/jest/issues/890#issuecomment-415202799 + window.history.pushState({}, 'Test Title', '/?next=%2Ffoo%3Fbar%3Dbaz'); + jest.spyOn(window, 'fetch') .mockImplementationOnce((_url) => { // initial fetch of options from the server diff --git a/tests/javascripts/jest.config.js b/tests/javascripts/jest.config.js index f686f6b69..881bcf89e 100644 --- a/tests/javascripts/jest.config.js +++ b/tests/javascripts/jest.config.js @@ -1,4 +1,4 @@ module.exports = { setupFiles: ['./support/setup.js'], - testURL: 'https://www.notifications.service.gov.uk/?next=%2Ffoo%3Fbar%3Dbaz' + testURL: 'https://www.notifications.service.gov.uk', }