Skip to content

Commit

Permalink
ci: Shim WebCrypto on node.js 18 for core tests
Browse files Browse the repository at this point in the history
  • Loading branch information
netroy committed Dec 20, 2024
1 parent f924f2a commit 69af833
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/core/test/setup-mocks.ts
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
import 'reflect-metadata';

// WebCrypto Polyfill for older versions of Node.js 18
if (!globalThis.crypto?.getRandomValues) {
globalThis.crypto = require('node:crypto').webcrypto;
}

0 comments on commit 69af833

Please sign in to comment.