Files
2026-05-27 23:47:53 +01:00

11 lines
297 B
TypeScript

import { webcrypto } from "node:crypto";
// Polyfill Web Crypto for Node.js environments (Vitest forks pool)
if (typeof globalThis.crypto === "undefined") {
Object.defineProperty(globalThis, "crypto", {
value: webcrypto,
writable: false,
configurable: true,
});
}