diff options
author | akanass <akanass@icloud.com> | 2021-05-09 19:15:18 +0200 |
---|---|---|
committer | akanass <akanass@icloud.com> | 2021-05-09 19:15:18 +0200 |
commit | d89d5d57d0c618410c958c96d5aee9492348f768 (patch) | |
tree | 6a528b6adc6da63216e3a480e6b3d26cce23614d /packages/browser/src/methods/startAttestation.test.ts | |
parent | d061d213ace42d382fa605a363f3ef2b781a1ce3 (diff) | |
parent | 7d015c27d523da2c34495b65b8ca1a10044dad0d (diff) |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'packages/browser/src/methods/startAttestation.test.ts')
-rw-r--r-- | packages/browser/src/methods/startAttestation.test.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/browser/src/methods/startAttestation.test.ts b/packages/browser/src/methods/startAttestation.test.ts index b4cfa52..244a4d2 100644 --- a/packages/browser/src/methods/startAttestation.test.ts +++ b/packages/browser/src/methods/startAttestation.test.ts @@ -5,7 +5,7 @@ import { PublicKeyCredentialCreationOptionsJSON, } from '@simplewebauthn/typescript-types'; -import toUint8Array from '../helpers/toUint8Array'; +import utf8StringToBuffer from '../helpers/utf8StringToBuffer'; import supportsWebauthn from '../helpers/supportsWebauthn'; import bufferToBase64URLString from '../helpers/bufferToBase64URLString'; @@ -20,7 +20,7 @@ const mockAttestationObject = 'mockAtte'; const mockClientDataJSON = 'mockClie'; const goodOpts1: PublicKeyCredentialCreationOptionsJSON = { - challenge: bufferToBase64URLString(toUint8Array('fizz')), + challenge: bufferToBase64URLString(utf8StringToBuffer('fizz')), attestation: 'direct', pubKeyCredParams: [ { @@ -90,7 +90,7 @@ test('should return base64url-encoded response values', async done => { return new Promise(resolve => { resolve({ id: 'foobar', - rawId: toUint8Array('foobar'), + rawId: utf8StringToBuffer('foobar'), response: { attestationObject: Buffer.from(mockAttestationObject, 'ascii'), clientDataJSON: Buffer.from(mockClientDataJSON, 'ascii'), |