Skip to content

Commit

Permalink
code: conditionally add crypto to global
Browse files Browse the repository at this point in the history
  • Loading branch information
xstelea committed Nov 22, 2024
1 parent 0e719c6 commit 06a7094
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/setup-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,5 @@ resetMocks()

global.chrome = chrome

global.crypto.subtle = webcrypto.subtle
global.crypto.randomUUID = randomUUID
if (!global?.crypto?.subtle) global.crypto.subtle = webcrypto.subtle
if (!global?.crypto?.randomUUID) global.crypto.randomUUID = randomUUID

0 comments on commit 06a7094

Please sign in to comment.