mirror of
https://github.com/nodejs/node.git
synced 2025-05-03 07:51:12 +00:00

PR-URL: https://github.com/nodejs/node/pull/41651 Fixes: https://github.com/nodejs/node/issues/41450 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
24 lines
532 B
JavaScript
24 lines
532 B
JavaScript
// Flags: --expose-internals
|
|
'use strict';
|
|
/* eslint-disable no-global-assign */
|
|
|
|
require('../common');
|
|
|
|
const {
|
|
structuredClone: _structuredClone,
|
|
} = require('internal/structured_clone');
|
|
|
|
const {
|
|
strictEqual,
|
|
throws,
|
|
} = require('assert');
|
|
|
|
strictEqual(globalThis.structuredClone, _structuredClone);
|
|
structuredClone = undefined;
|
|
strictEqual(globalThis.structuredClone, undefined);
|
|
|
|
// Restore the value for the known globals check.
|
|
structuredClone = _structuredClone;
|
|
|
|
throws(() => _structuredClone(), /ERR_MISSING_ARGS/);
|