summaryrefslogtreecommitdiffhomepage
path: root/packages/server/src/authentication/verifyAuthenticationResponse.test.ts
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2022-07-28 10:03:52 -0700
committerGitHub <noreply@github.com>2022-07-28 10:03:52 -0700
commit522f00d9ae613ff1f51f0c1aca85a6ae129381c5 (patch)
tree2ffa63377b3cce99dc1b7c7459292c071ce709a0 /packages/server/src/authentication/verifyAuthenticationResponse.test.ts
parent369708726378b0b24f873982ac9ca31d706fe2fe (diff)
parent7b1cadfaa2c5f78b56c4424db991674fddd7e152 (diff)
Merge pull request #234 from MasterKale/all-named-exports
All named exports
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),
);