Skip to content

Commit

Permalink
try this
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Dec 4, 2023
1 parent 051ea09 commit dff154f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/kit/src/runtime/server/page/csp.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ import { webcrypto } from 'node:crypto';
import { assert, beforeAll, test } from 'vitest';
import { Csp } from './csp.js';

// @ts-expect-error
globalThis.crypto = webcrypto;
// TODO: remove after bumping peer dependency to require Node 20
if (!globalThis.crypto) {
// @ts-expect-error
globalThis.crypto = webcrypto;
}

beforeAll(() => {
// @ts-expect-error
Expand Down

0 comments on commit dff154f

Please sign in to comment.