ci: Shim WebCrypto on node.js 18 for core tests (#12335)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2024-12-20 16:47:39 +01:00 committed by GitHub
parent f924f2a6d7
commit 6c323e4e49
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;
}