blob: f0fbe61a202eea3ac6e76d27497ce3ad281502af (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
'use strict';
const common = require('../common');
if (!common.hasCrypto)
common.skip('missing crypto');
const assert = require('assert');
const { getRandomValues } = globalThis.crypto;
assert.throws(() => getRandomValues(new Uint8Array()), { code: 'ERR_INVALID_THIS' });
|