mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 21:19:50 +01:00
74dff83fad
Since eslint fixed https://github.com/eslint/eslint/issues/16412 and we are on eslint v8.57.0 so that we can take advantage of no-restricted-properties rule for webcrypto. PR-URL: https://github.com/nodejs/node/pull/53023 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
14 lines
410 B
JavaScript
14 lines
410 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
if (!common.hasCrypto)
|
|
common.skip('missing crypto');
|
|
|
|
const assert = require('assert');
|
|
const crypto = require('crypto');
|
|
|
|
/* eslint-disable no-restricted-properties */
|
|
assert.strictEqual(globalThis.crypto, crypto.webcrypto);
|
|
assert.strictEqual(Crypto, crypto.webcrypto.constructor);
|
|
assert.strictEqual(SubtleCrypto, crypto.webcrypto.subtle.constructor);
|