This repository has been archived by the owner on May 11, 2021. It is now read-only.
forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
util: fix module prefixes during inspection
Backport-PR-URL: nodejs#37100 Signed-off-by: Ruben Bridgewater <[email protected]> Fixes: nodejs#36151 PR-URL: nodejs#36178 Fixes: nodejs#35730 Refs: nodejs#35754 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]>
- Loading branch information
Showing
4 changed files
with
26 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,21 @@ | ||
// Flags: --experimental-loader ./test/fixtures/es-module-loaders/loader-with-custom-condition.mjs | ||
import '../common/index.mjs'; | ||
import assert from 'assert'; | ||
import util from 'util'; | ||
|
||
import * as ns from '../fixtures/es-modules/conditional-exports.mjs'; | ||
|
||
assert.deepStrictEqual({ ...ns }, { default: 'from custom condition' }); | ||
|
||
assert.strictEqual( | ||
util.inspect(ns, { showHidden: false }), | ||
"[Module: null prototype] { default: 'from custom condition' }" | ||
); | ||
|
||
assert.strictEqual( | ||
util.inspect(ns, { showHidden: true }), | ||
'[Module: null prototype] {\n' + | ||
" default: 'from custom condition',\n" + | ||
" [Symbol(Symbol.toStringTag)]: 'Module'\n" + | ||
'}' | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters