Skip to content

Commit 16dd26c

Browse files
committed
Fix coverage on node 20
1 parent 48f2834 commit 16dd26c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/index.spec.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ import {
88
NONE_KEY,
99
} from "./index.js";
1010

11-
// @ts-expect-error next-line
12-
globalThis.crypto = webcrypto; // Node.js 18 support.
11+
try {
12+
// @ts-expect-error next-line
13+
globalThis.crypto = webcrypto; // Node.js 18 support.
14+
} catch {
15+
// Noop.
16+
}
1317

1418
describe("web jwt", () => {
1519
describe("validation", () => {

0 commit comments

Comments
 (0)