add webauthn authentication js tests

notably i had to change `window.location = foo` to
`window.location.assign` so that i could have something to spy on with
jest. mocking sucks. Otherwise this is pretty similar to the
registerSecurityKey.test.js file.
This commit is contained in:
Leo Hemsted
2021-05-25 18:02:38 +01:00
parent e765f98a02
commit 6a21915cee
2 changed files with 233 additions and 1 deletions

View File

@@ -47,7 +47,7 @@
throw Error(response.statusText);
})
.then(data => {
window.location = data.redirect_url;
window.location.assign(data.redirect_url);
});
})
.catch(error => {