diff options
author | Eiji Kitamura <agektmr@google.com> | 2022-07-22 15:35:41 +0900 |
---|---|---|
committer | Eiji Kitamura <agektmr@google.com> | 2022-07-22 15:35:41 +0900 |
commit | 53dd14e4dc21b1d97224f6b8b5f36285ed72283a (patch) | |
tree | 418a31a7b3e870b3ec2b5b1b6ee784a21aa5d231 /packages/server/src/helpers/parseAuthenticatorData.test.ts | |
parent | 7fdfa35dd57b3998f0fbe78f2111434de3c3afc9 (diff) |
Fixes to reflect comments
- Rename `decodeExtensions` to `decodeAuthenticatorExtensions`
- Mention authenticator extension
- Include decoding in `parseAuthenticatorData`
- Add tests for `decodeAuthenticatorExtensions`
Diffstat (limited to 'packages/server/src/helpers/parseAuthenticatorData.test.ts')
-rw-r--r-- | packages/server/src/helpers/parseAuthenticatorData.test.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/packages/server/src/helpers/parseAuthenticatorData.test.ts b/packages/server/src/helpers/parseAuthenticatorData.test.ts index a815c85..29abf64 100644 --- a/packages/server/src/helpers/parseAuthenticatorData.test.ts +++ b/packages/server/src/helpers/parseAuthenticatorData.test.ts @@ -43,11 +43,10 @@ test('should parse extension data', () => { const parsed = parseAuthenticatorData(authDataWithED); - const { extensionsDataBuffer } = parsed; + const { extensions } = parsed; - if (extensionsDataBuffer) { - const decoded = cbor.decodeFirstSync(extensionsDataBuffer); - expect(decoded).toEqual({ + if (extensions) { + expect(extensions).toEqual({ 'example.extension': 'This is an example extension! If you read this message, you probably successfully passing conformance tests. Good job!', }); |