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