mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-04-24 11:11:15 -04:00
Merge pull request #3922 from alphagov/try-avoid-global-query-params
Set window location for individual test
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user