summaryrefslogtreecommitdiffhomepage
path: root/packages/browser/src/methods/startAttestation.test.ts
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2021-04-17 22:06:35 -0700
committerGitHub <noreply@github.com>2021-04-17 22:06:35 -0700
commitbecd1415ff3fba22218f808f6dac761901b71a5c (patch)
tree541f90e33aa08659c985c5c3f91ebfaed74692e8 /packages/browser/src/methods/startAttestation.test.ts
parentcb445cd8404af140120260ca77294a70d7202a71 (diff)
parent926eda9ae5f12b88179c6c13d0ee5ede49e5e411 (diff)
Merge pull request #120 from MasterKale/fix/simplify-encoding-user-handle-in-assertion-response
fix/simplify-encoding-user-handle-in-assertion-response
Diffstat (limited to 'packages/browser/src/methods/startAttestation.test.ts')
-rw-r--r--packages/browser/src/methods/startAttestation.test.ts6
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'),