mirror of
https://github.com/nodejs/node.git
synced 2025-05-03 09:52:21 +00:00

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: https://github.com/nodejs/node/pull/36989 Refs: https://github.com/nodejs/node/pull/36652 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
19 lines
614 B
JavaScript
19 lines
614 B
JavaScript
// Flags: --expose-internals
|
|
'use strict';
|
|
|
|
const common = require('../common');
|
|
const { primordials: { SafeMap } } = require('internal/test/binding');
|
|
|
|
const { options, aliases, getOptionValue } = require('internal/options');
|
|
const assert = require('assert');
|
|
|
|
assert(options instanceof SafeMap,
|
|
"require('internal/options').options is a SafeMap");
|
|
|
|
assert(aliases instanceof SafeMap,
|
|
"require('internal/options').aliases is a SafeMap");
|
|
|
|
Map.prototype.get =
|
|
common.mustNotCall('`getOptionValue` must not call user-mutable method');
|
|
assert.strictEqual(getOptionValue('--expose-internals'), true);
|