Skip to content

Commit 1bec580

Browse files
Update test/module-hooks/test-module-hooks-builtin-require.js
Co-authored-by: Joyee Cheung <[email protected]>
1 parent 9bcd67a commit 1bec580

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/module-hooks/test-module-hooks-builtin-require.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ for (const mod of schemelessBlockList) {
2323

2424
const hook = registerHooks({
2525
resolve: common.mustCall((specifier, context, nextResolve) => {
26-
return nextResolve(specifier, context);
26+
const result = nextResolve(specifier, context);
27+
assert.match(result.url, /^node:/);
28+
assert.strictEqual(schemelessBlockList.has(result.url.slice(5, result.url.length)), true);
29+
return result;
2730
}, testModules.length),
2831
load: common.mustCall(function load(url, context, nextLoad) {
2932
assert.match(url, /^node:/);

0 commit comments

Comments
 (0)