/
githubmirror
/
node
Обзор
Документация
Войти
/
githubmirror
/
node
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v22.22.2
test/module-hooks/test-module-hooks-load-context-optional.js
16 строк
358 B
Joyee Cheung
module: allow omitting context in synchronous next hooks
17 апр 2025, 16:50
Не верифицирован
17 апр 2025, 16:50
41fa7d3
Код
Авторство
О чём код?
'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();