summaryrefslogtreecommitdiffhomepage
path: root/packages/browser/src/methods/startAuthentication.test.ts
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2022-04-27 22:15:50 -0700
committerGitHub <noreply@github.com>2022-04-27 22:15:50 -0700
commit76383fddef93d4ce4e9f9f7b4b8c3ce4cb685f79 (patch)
treef4d88f5208689e752b699ddaf19526eae40e9e24 /packages/browser/src/methods/startAuthentication.test.ts
parentdb2d9b2ab4df4c00566951107657a211cef74c90 (diff)
parent02396a1789fbcae2145e607d8f808f6268a759a2 (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.ts17
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');