Skip to content

Commit 688f14c

Browse files
committed
test: add exception test to parseAuthenticatorFlags
1 parent 0f367aa commit 688f14c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

packages/delegation-toolkit/test/webAuthn.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,5 +283,12 @@ describe('webAuthn', () => {
283283

284284
expect(userVerified).to.equal(false);
285285
});
286+
it('should throw an error if the authenticator flags are not found at the expected offset', () => {
287+
const flags = 0b11111011;
288+
289+
expect(() => parseAuthenticatorFlags(toHex(flags))).to.throw(
290+
'Authenticator flags not found in authenticator data',
291+
);
292+
});
286293
});
287294
});

0 commit comments

Comments
 (0)