summaryrefslogtreecommitdiffhomepage
path: root/packages/server/src/authentication/verifyAuthenticationResponse.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/server/src/authentication/verifyAuthenticationResponse.test.ts')
-rw-r--r--packages/server/src/authentication/verifyAuthenticationResponse.test.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/server/src/authentication/verifyAuthenticationResponse.test.ts b/packages/server/src/authentication/verifyAuthenticationResponse.test.ts
index dbaa946..e5b6667 100644
--- a/packages/server/src/authentication/verifyAuthenticationResponse.test.ts
+++ b/packages/server/src/authentication/verifyAuthenticationResponse.test.ts
@@ -1,9 +1,9 @@
import base64url from 'base64url';
-import verifyAuthenticationResponse from './verifyAuthenticationResponse';
+import { verifyAuthenticationResponse } from './verifyAuthenticationResponse';
-import * as decodeClientDataJSON from '../helpers/decodeClientDataJSON';
-import * as parseAuthenticatorData from '../helpers/parseAuthenticatorData';
-import toHash from '../helpers/toHash';
+import * as esmDecodeClientDataJSON from '../helpers/decodeClientDataJSON';
+import * as esmParseAuthenticatorData from '../helpers/parseAuthenticatorData';
+import { toHash } from '../helpers/toHash';
import {
AuthenticatorDevice,
AuthenticationCredentialJSON,
@@ -13,8 +13,8 @@ let mockDecodeClientData: jest.SpyInstance;
let mockParseAuthData: jest.SpyInstance;
beforeEach(() => {
- mockDecodeClientData = jest.spyOn(decodeClientDataJSON, 'default');
- mockParseAuthData = jest.spyOn(parseAuthenticatorData, 'default');
+ mockDecodeClientData = jest.spyOn(esmDecodeClientDataJSON, 'decodeClientDataJSON');
+ mockParseAuthData = jest.spyOn(esmParseAuthenticatorData, 'parseAuthenticatorData');
});
afterEach(() => {
@@ -156,7 +156,7 @@ test('should not compare counters if both are 0', () => {
});
test('should throw an error if user verification is required but user was not verified', () => {
- const actualData = parseAuthenticatorData.default(
+ const actualData = esmParseAuthenticatorData.parseAuthenticatorData(
base64url.toBuffer(assertionResponse.response.authenticatorData),
);