diff options
Diffstat (limited to 'packages/browser/src/methods/startRegistration.test.ts')
-rw-r--r-- | packages/browser/src/methods/startRegistration.test.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/packages/browser/src/methods/startRegistration.test.ts b/packages/browser/src/methods/startRegistration.test.ts index 360884e..d8d34aa 100644 --- a/packages/browser/src/methods/startRegistration.test.ts +++ b/packages/browser/src/methods/startRegistration.test.ts @@ -176,6 +176,23 @@ test('should include extension results when no extensions specified', async () = expect(response.clientExtensionResults).toEqual({}); }); +test('should support "cable" transport', async () => { + const opts: PublicKeyCredentialCreationOptionsJSON = { + ...goodOpts1, + excludeCredentials: [ + { + ...goodOpts1.excludeCredentials![0], + transports: ["cable"], + }, + ] + }; + + await startRegistration(opts); + + expect(mockNavigatorCreate.mock.calls[0][0].publicKey.excludeCredentials[0].transports[0]) + .toEqual("cable"); +}); + describe('WebAuthnError', () => { describe('AbortError', () => { const AbortError = generateCustomError('AbortError'); |