summaryrefslogtreecommitdiffhomepage
path: root/packages/browser/src/methods/startAttestation.test.ts
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2021-04-15 21:34:26 -0700
committerMatthew Miller <matthew@millerti.me>2021-04-15 21:34:26 -0700
commitc8c492572a0f72c6d9b8795a4e37621b5f49d2b9 (patch)
tree204dddd53d07a64ea3f21ee855876dc9af4267be /packages/browser/src/methods/startAttestation.test.ts
parentcb445cd8404af140120260ca77294a70d7202a71 (diff)
Rename toUint8Array to stringToArrayBuffer
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..0b77743 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 stringToArrayBuffer from '../helpers/stringToArrayBuffer';
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(stringToArrayBuffer('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: stringToArrayBuffer('foobar'),
response: {
attestationObject: Buffer.from(mockAttestationObject, 'ascii'),
clientDataJSON: Buffer.from(mockClientDataJSON, 'ascii'),