diff options
Diffstat (limited to 'packages/browser/src/methods/startAttestation.test.ts')
-rw-r--r-- | packages/browser/src/methods/startAttestation.test.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/browser/src/methods/startAttestation.test.ts b/packages/browser/src/methods/startAttestation.test.ts index 539ffe5..faeca8b 100644 --- a/packages/browser/src/methods/startAttestation.test.ts +++ b/packages/browser/src/methods/startAttestation.test.ts @@ -38,6 +38,11 @@ const goodOpts1: PublicKeyCredentialCreationOptionsJSON = { name: 'username', }, timeout: 1, + excludeCredentials: [{ + id: 'authIdentifier', + type: 'public-key', + transports: ['internal'], + }], }, }; @@ -64,6 +69,11 @@ test('should convert options before passing to navigator.credentials.create(...) expect(argsPublicKey.challenge).toEqual(toUint8Array(goodOpts1.publicKey.challenge)); expect(argsPublicKey.user.id).toEqual(toUint8Array(goodOpts1.publicKey.user.id)); + expect(argsPublicKey.excludeCredentials).toEqual([{ + id: base64js.toByteArray('authIdentifier=='), + type: 'public-key', + transports: ['internal'], + }]) done(); }); |