Skip to content

Commit

Permalink
ci: Shim WebCrypto on node.js 18 for core tests (#12335)
Browse files Browse the repository at this point in the history
  • Loading branch information
netroy authored and riascho committed Dec 23, 2024
1 parent c7f0388 commit 9a01eef
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 9a01eef

Please sign in to comment.