Files
Kmake/test/module-hooks/test-module-hooks-load-context-optional.js

17 lines
358 B
JavaScript
Raw Permalink Normal View History

2026-05-26 23:36:42 -07:00
'use strict';
// Test that the context parameter can be omitted in the nextLoad invocation.
const common = require('../common');
const { registerHooks } = require('module');
const hook = registerHooks({
load: common.mustCall(function(url, context, nextLoad) {
return nextLoad(url);
}, 1),
});
require('../fixtures/empty.js');
hook.deregister();