summaryrefslogtreecommitdiffhomepage
path: root/packages/browser/src/methods/startAttestation.test.ts
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2021-02-04 09:45:52 -0800
committerMatthew Miller <matthew@millerti.me>2021-02-04 09:45:52 -0800
commitc58ca6abf0d64a85771a865cf59f9783a20c66f0 (patch)
tree3f44297f5b47abf1b88db49ae11e399282a9adaf /packages/browser/src/methods/startAttestation.test.ts
parentd8cbcb40b9f32d7a6eab82f5e31c6e5272c9d163 (diff)
Restore userID argument in attestation options
Diffstat (limited to 'packages/browser/src/methods/startAttestation.test.ts')
-rw-r--r--packages/browser/src/methods/startAttestation.test.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/browser/src/methods/startAttestation.test.ts b/packages/browser/src/methods/startAttestation.test.ts
index ad71488..d178609 100644
--- a/packages/browser/src/methods/startAttestation.test.ts
+++ b/packages/browser/src/methods/startAttestation.test.ts
@@ -3,6 +3,7 @@ import {
PublicKeyCredentialCreationOptionsJSON,
} from '@simplewebauthn/typescript-types';
+import toUint8Array from '../helpers/toUint8Array';
import supportsWebauthn from '../helpers/supportsWebauthn';
import bufferToBase64URLString from '../helpers/bufferToBase64URLString';
@@ -17,7 +18,7 @@ const mockAttestationObject = 'mockAtte';
const mockClientDataJSON = 'mockClie';
const goodOpts1: PublicKeyCredentialCreationOptionsJSON = {
- challenge: bufferToBase64URLString(Buffer.from('fizz', 'ascii')),
+ challenge: bufferToBase64URLString(toUint8Array('fizz')),
attestation: 'direct',
pubKeyCredParams: [
{
@@ -87,7 +88,7 @@ test('should return base64url-encoded response values', async done => {
return new Promise(resolve => {
resolve({
id: 'foobar',
- rawId: Buffer.from('foobar', 'ascii'),
+ rawId: toUint8Array('foobar'),
response: {
attestationObject: Buffer.from(mockAttestationObject, 'ascii'),
clientDataJSON: Buffer.from(mockClientDataJSON, 'ascii'),