Files
Kmake/test/parallel/test-webcrypto-getRandomValues.js

12 lines
278 B
JavaScript
Raw Permalink Normal View History

2026-05-26 23:36:42 -07:00
'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' });