-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Signed-off-by: Ruben Bridgewater <[email protected]> Fixes: #36151 PR-URL: #36178 Fixes: #35730 Refs: #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
25 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