diff options
author | Matthew Miller <matthew@millerti.me> | 2022-07-28 10:06:02 -0700 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2022-07-28 10:06:02 -0700 |
commit | af8d952eeed08f01a9d938da126152c649caa297 (patch) | |
tree | 0d528cd1382f7066114570ed82ea6f4216b21642 /packages/browser/src/methods/startRegistration.test.ts | |
parent | 522f00d9ae613ff1f51f0c1aca85a6ae129381c5 (diff) |
Run `npm run lint`
Diffstat (limited to 'packages/browser/src/methods/startRegistration.test.ts')
-rw-r--r-- | packages/browser/src/methods/startRegistration.test.ts | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/packages/browser/src/methods/startRegistration.test.ts b/packages/browser/src/methods/startRegistration.test.ts index 1ca9e62..381830e 100644 --- a/packages/browser/src/methods/startRegistration.test.ts +++ b/packages/browser/src/methods/startRegistration.test.ts @@ -106,7 +106,7 @@ test('should return base64url-encoded response values', async () => { expect(response.response.clientDataJSON).toEqual('bW9ja0NsaWU'); }); -test('should throw error if WebAuthn isn\'t supported', async () => { +test("should throw error if WebAuthn isn't supported", async () => { mockSupportsWebauthn.mockReturnValue(false); await expect(startRegistration(goodOpts1)).rejects.toThrow( @@ -183,15 +183,16 @@ test('should support "cable" transport in excludeCredentials', async () => { excludeCredentials: [ { ...goodOpts1.excludeCredentials![0], - transports: ["cable"], + transports: ['cable'], }, - ] + ], }; await startRegistration(opts); - expect(mockNavigatorCreate.mock.calls[0][0].publicKey.excludeCredentials[0].transports[0]) - .toEqual("cable"); + expect( + mockNavigatorCreate.mock.calls[0][0].publicKey.excludeCredentials[0].transports[0], + ).toEqual('cable'); }); test('should return "cable" transport from response', async () => { @@ -201,7 +202,7 @@ test('should return "cable" transport from response', async () => { response: { attestationObject: Buffer.from(mockAttestationObject, 'ascii'), clientDataJSON: Buffer.from(mockClientDataJSON, 'ascii'), - getTransports: () => (["cable"]), + getTransports: () => ['cable'], }, getClientExtensionResults: () => ({}), type: 'webauthn.create', @@ -209,7 +210,7 @@ test('should return "cable" transport from response', async () => { const response = await startRegistration(goodOpts1); - expect(response.transports).toEqual(["cable"]); + expect(response.transports).toEqual(['cable']); }); test('should cancel an existing call when executed again', async () => { |