summaryrefslogtreecommitdiffhomepage
path: root/packages/browser/src/methods/startAttestation.test.ts
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2021-04-15 21:49:14 -0700
committerMatthew Miller <matthew@millerti.me>2021-04-15 21:49:14 -0700
commitfb732e401eaf1a9a0d1ff65fcb29343de201c140 (patch)
tree5d717ff57cfab8790a9658732634d91554029b8c /packages/browser/src/methods/startAttestation.test.ts
parent1a4c8ab2ab4bcb27b83b2be6d8d0fddaaa56ba50 (diff)
Unify naming convention of string<->buffer helpers
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 0b77743..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 stringToArrayBuffer from '../helpers/stringToArrayBuffer';
+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(stringToArrayBuffer('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: stringToArrayBuffer('foobar'),
+ rawId: utf8StringToBuffer('foobar'),
response: {
attestationObject: Buffer.from(mockAttestationObject, 'ascii'),
clientDataJSON: Buffer.from(mockClientDataJSON, 'ascii'),