Skip to content

Commit

Permalink
global.crypto is now defined in Node 20
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonroelofs committed Mar 21, 2024
1 parent 28b0f8b commit 6ac2dbc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion setup-jest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ import { Crypto } from '@peculiar/webcrypto';

enableFetchMocks();

global.crypto = new Crypto();
if (global.crypto === undefined) {
global.crypto = new Crypto();
}

0 comments on commit 6ac2dbc

Please sign in to comment.