Stackedit/test/unit/mocks/cryptoMock.js
Benoit Schweblin e05e7717eb Added tests
2018-06-07 23:56:11 +00:00

8 lines
161 B
JavaScript

window.crypto = {
getRandomValues(array) {
for (let i = 0; i < array.length; i += 1) {
array[i] = Math.floor(Math.random() * 1000000);
}
},
};