Skip to content

Commit

Permalink
Fix stub failing when ran on node versions that do not have the globa…
Browse files Browse the repository at this point in the history
…l crypto object
  • Loading branch information
kuba-orlik committed Jan 26, 2024
1 parent 4e549e9 commit 2520455
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { MCEvent } from '@managed-components/types'
import { getEventData } from '.'
import _crypto from 'crypto'

Check failure on line 3 in src/index.test.ts

View workflow job for this annotation

GitHub Actions / build-test (18.x)

'_crypto' is defined but never used

if (!crypto) {
if (!global.crypto) {
vi.stubGlobal('crypto', crypto.webcrypto)
}

Expand Down

0 comments on commit 2520455

Please sign in to comment.