Skip to content
This repository was archived by the owner on Aug 26, 2025. It is now read-only.

Commit 461e8d6

Browse files
committed
Commit test fixes that were missing from the published version commit.
1 parent beac416 commit 461e8d6

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

src/webauthn-json/extended.spec.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ import {
1313
import { convert } from "./convert";
1414
import "./arraybuffer.jest";
1515

16+
const unimplemented: any = () => {
17+
throw new Error("unimplemented");
18+
};
19+
1620
describe("extended schema", () => {
1721
test("converts CredentialCreationOptionsExtendedJSON", () => {
1822
const cco: CredentialCreationOptionsExtendedJSON = {
@@ -63,6 +67,9 @@ describe("extended schema", () => {
6367
response: {
6468
clientDataJSON: new Uint8Array([9, 10, 11, 12]),
6569
attestationObject: new Uint8Array([13, 14, 15, 16]),
70+
getAuthenticatorData: unimplemented,
71+
getPublicKey: unimplemented,
72+
getPublicKeyAlgorithm: unimplemented,
6673
getTransports: () => ["usb"],
6774
} as AuthenticatorAttestationResponse,
6875
getClientExtensionResults: () =>

src/webauthn-json/extended/api.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ import {
44
Base64urlString,
55
} from "../base64url";
66
import { convert } from "../convert";
7-
import { AuthenticatorAttestationResponseJSON } from "../basic/json";
7+
import {
8+
AuthenticatorAttestationResponseJSON,
9+
PublicKeyCredentialWithClientExtensionResults,
10+
} from "../basic/json";
811
import {
912
CredentialCreationOptionsExtendedJSON,
1013
CredentialRequestOptionsExtendedJSON,
@@ -33,7 +36,7 @@ export function createExtendedRequestFromJSON(
3336
}
3437

3538
export function createExtendedResponseToJSON(
36-
credential: PublicKeyCredential,
39+
credential: PublicKeyCredentialWithClientExtensionResults,
3740
): PublicKeyCredentialWithAttestationExtendedResultsJSON {
3841
return convert(
3942
bufferToBase64url,
@@ -113,7 +116,7 @@ export function getExtendedRequestFromJSON(
113116
}
114117

115118
export function getExtendedResponseToJSON(
116-
credential: PublicKeyCredential,
119+
credential: PublicKeyCredentialWithClientExtensionResults,
117120
): PublicKeyCredentialWithAssertionExtendedResultsJSON {
118121
return convert(
119122
bufferToBase64url,

0 commit comments

Comments
 (0)