summaryrefslogtreecommitdiffhomepage
path: root/packages/server/src/helpers/parseAuthenticatorData.test.ts
diff options
context:
space:
mode:
authorEiji Kitamura <agektmr@google.com>2022-07-22 15:35:41 +0900
committerEiji Kitamura <agektmr@google.com>2022-07-22 15:35:41 +0900
commit53dd14e4dc21b1d97224f6b8b5f36285ed72283a (patch)
tree418a31a7b3e870b3ec2b5b1b6ee784a21aa5d231 /packages/server/src/helpers/parseAuthenticatorData.test.ts
parent7fdfa35dd57b3998f0fbe78f2111434de3c3afc9 (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.ts7
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!',
});