Skip to content

Commit 628e6d7

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

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
@@ -24,7 +24,10 @@ for (const mod of schemelessBlockList) {
2424

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

0 commit comments

Comments
 (0)