make crypto available as a global on nip04 test.

This commit is contained in:
fiatjaf
2022-12-21 17:12:50 -03:00
parent 26e6da6ba3
commit 8262a81cb2

View File

@@ -1,5 +1,6 @@
/* eslint-env jest */
globalThis.crypto = require('crypto')
const {nip04, getPublicKey, generatePrivateKey} = require('./lib/nostr.cjs')
test('encrypt and decrypt message', async () => {