diff options
author | Matthew Miller <matthew@millerti.me> | 2022-04-27 22:15:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-27 22:15:50 -0700 |
commit | 76383fddef93d4ce4e9f9f7b4b8c3ce4cb685f79 (patch) | |
tree | f4d88f5208689e752b699ddaf19526eae40e9e24 /packages/browser/src/methods/startAuthentication.test.ts | |
parent | db2d9b2ab4df4c00566951107657a211cef74c90 (diff) | |
parent | 02396a1789fbcae2145e607d8f808f6268a759a2 (diff) |
Merge pull request #198 from MasterKale/feat/cable-take-2
feat/cable-take-2
Diffstat (limited to 'packages/browser/src/methods/startAuthentication.test.ts')
-rw-r--r-- | packages/browser/src/methods/startAuthentication.test.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/packages/browser/src/methods/startAuthentication.test.ts b/packages/browser/src/methods/startAuthentication.test.ts index 725cd4e..658b67c 100644 --- a/packages/browser/src/methods/startAuthentication.test.ts +++ b/packages/browser/src/methods/startAuthentication.test.ts @@ -202,6 +202,23 @@ test('should include extension results when no extensions specified', async () = expect(response.clientExtensionResults).toEqual({}); }); +test('should support "cable" transport', async () => { + const opts: PublicKeyCredentialRequestOptionsJSON = { + ...goodOpts1, + allowCredentials: [ + { + ...goodOpts1.allowCredentials![0], + transports: ["cable"], + }, + ] + }; + + await startAuthentication(opts); + + expect(mockNavigatorGet.mock.calls[0][0].publicKey.allowCredentials[0].transports[0]) + .toEqual("cable"); +}); + describe('WebAuthnError', () => { describe('AbortError', () => { const AbortError = generateCustomError('AbortError'); |