diff options
author | Matthew Miller <matthew@millerti.me> | 2022-12-27 20:48:32 -0800 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2022-12-27 20:48:32 -0800 |
commit | 81d5cdb0960f5b7ba96cc67baf162c49056a20a5 (patch) | |
tree | 50edb9b47609b6fcb2a671894d61b790d22bee00 /packages/browser/src/methods | |
parent | 41984291cc6e87c5ba037bd7a7d43614b2f80921 (diff) |
Fix tests
Diffstat (limited to 'packages/browser/src/methods')
-rw-r--r-- | packages/browser/src/methods/startAuthentication.test.ts | 4 | ||||
-rw-r--r-- | packages/browser/src/methods/startRegistration.test.ts | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/packages/browser/src/methods/startAuthentication.test.ts b/packages/browser/src/methods/startAuthentication.test.ts index 9ebdd77..49f8898 100644 --- a/packages/browser/src/methods/startAuthentication.test.ts +++ b/packages/browser/src/methods/startAuthentication.test.ts @@ -115,7 +115,7 @@ test('should return base64url-encoded response values', async () => { userHandle: Buffer.from(mockUserHandle, 'ascii'), }, getClientExtensionResults: () => ({}), - type: 'webauthn.get', + type: 'public-key', authenticatorAttachment: '', }); }); @@ -299,7 +299,7 @@ test('should return authenticatorAttachment if present', async () => { return new Promise(resolve => { resolve({ response: {}, - getClientExtensionResults: () => {}, + getClientExtensionResults: () => { }, authenticatorAttachment: 'cross-platform', }); }); diff --git a/packages/browser/src/methods/startRegistration.test.ts b/packages/browser/src/methods/startRegistration.test.ts index 38ea52e..19e9185 100644 --- a/packages/browser/src/methods/startRegistration.test.ts +++ b/packages/browser/src/methods/startRegistration.test.ts @@ -102,7 +102,7 @@ test('should return base64url-encoded response values', async () => { getPublicKeyAlgorithm: () => -999, }, getClientExtensionResults: () => ({}), - type: 'webauthn.create', + type: 'public-key', authenticatorAttachment: '', }); }); @@ -219,9 +219,9 @@ test('should return "cable" transport from response', async () => { type: 'webauthn.create', }); - const response = await startRegistration(goodOpts1); + const regResponse = await startRegistration(goodOpts1); - expect(response.transports).toEqual(['cable']); + expect(regResponse.response.transports).toEqual(['cable']); }); test('should cancel an existing call when executed again', async () => { @@ -239,7 +239,7 @@ test('should return authenticatorAttachment if present', async () => { return new Promise(resolve => { resolve({ response: {}, - getClientExtensionResults: () => {}, + getClientExtensionResults: () => { }, authenticatorAttachment: 'cross-platform', }); }); |