mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-06-23 08:49:46 -04:00
Set window location for individual test
This is less surprising and means we don't end up in a situation where a future test needs to change the global config to something else.
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
|
||||
|
||||
Reference in New Issue
Block a user