node/test/parallel/test-global-webcrypto-disbled.js
Antoine du Hamel 6de2673a9f lib: enable global WebCrypto by default
Enables `--experimental-global-webcrypto` by default, and ensures that
the classic `node:crypto` core module is still available in `--eval` or
`--print` contexts.

PR-URL: https://github.com/nodejs/node/pull/42083
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2022-09-17 15:54:33 +02:00

11 lines
318 B
JavaScript

// Flags: --no-experimental-global-webcrypto
'use strict';
require('../common');
const assert = require('assert');
assert.strictEqual(typeof crypto, 'undefined');
assert.strictEqual(typeof Crypto, 'undefined');
assert.strictEqual(typeof CryptoKey, 'undefined');
assert.strictEqual(typeof SubtleCrypto, 'undefined');