We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98d8b40 commit 16d3b13Copy full SHA for 16d3b13
jest.env.setup.js
@@ -3,6 +3,11 @@ const crypto = require('crypto');
3
4
Object.defineProperty(globalThis, 'crypto', {
5
value: {
6
- getRandomValues: (arr) => crypto.randomBytes(arr.length),
+ getRandomValues: (arr) => {
7
+ for (let i = 0; i < arr.length; i++) {
8
+ arr[i] = Math.floor(Math.random() * 256);
9
+ }
10
+ return arr;
11
+ },
12
},
13
});
0 commit comments