Initial Commit
This commit is contained in:
7
packages/media/audio/voice/tests/setup/polyfills.ts
Normal file
7
packages/media/audio/voice/tests/setup/polyfills.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { webcrypto } from "node:crypto";
|
||||
|
||||
type WritableGlobal = { crypto?: Crypto };
|
||||
const g = globalThis as WritableGlobal;
|
||||
if (g.crypto === undefined) {
|
||||
g.crypto = webcrypto as unknown as Crypto;
|
||||
}
|
||||
Reference in New Issue
Block a user