summaryrefslogtreecommitdiffhomepage
path: root/packages/browser/src/helpers/platformAuthenticatorIsAvailable.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/browser/src/helpers/platformAuthenticatorIsAvailable.test.ts')
-rw-r--r--packages/browser/src/helpers/platformAuthenticatorIsAvailable.test.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/browser/src/helpers/platformAuthenticatorIsAvailable.test.ts b/packages/browser/src/helpers/platformAuthenticatorIsAvailable.test.ts
index 3e0b65b..6f2b91d 100644
--- a/packages/browser/src/helpers/platformAuthenticatorIsAvailable.test.ts
+++ b/packages/browser/src/helpers/platformAuthenticatorIsAvailable.test.ts
@@ -7,8 +7,8 @@ beforeEach(() => {
// @ts-ignore 2741
window.PublicKeyCredential = jest.fn().mockReturnValue(() => {});
- window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable =
- mockIsUVPAA.mockResolvedValue(true);
+ window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable = mockIsUVPAA
+ .mockResolvedValue(true);
});
test('should return true when platform authenticator is available', async () => {
@@ -26,7 +26,8 @@ test('should return false when platform authenticator is unavailable', async ()
});
test('should return false when browser does not support WebAuthn', async () => {
- delete (window as any).PublicKeyCredential;
+ // This looks weird but it appeases the linter so it's _fiiiine_
+ delete (window as { PublicKeyCredential: unknown }).PublicKeyCredential;
const isAvailable = await platformAuthenticatorIsAvailable();
expect(isAvailable).toEqual(false);