/
githubmirror
/
deno
Обзор
Документация
Войти
/
githubmirror
/
deno
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tests/specs/node/node_compat_shim/__test__.jsonc
31 строка
855 B
Bartek Iwańczuk
feat(cli): provide a `node` on PATH when Node.js is not installed (#34969)
17 июн 2026, 10:30
Не верифицирован
17 июн 2026, 10:30
f2f8666
Код
Авторство
О чём код?
{ "tempDir": true, "tests": { // With no real `node` on PATH, Deno provides itself as `node`, so a native // PATH-based spawn of `node` succeeds. "provides_node_when_absent": { "if": "unix", "args": "run -A spawn_node.mjs", "envs": { "PATH": "" }, "output": "spawn_node.out" }, // With the feature disabled, the spawn fails because there is no `node`. "opt_out": { "if": "unix", "args": "run -A spawn_node.mjs", "envs": { "PATH": "", "DENO_DISABLE_NODE_SHIM": "1" }, "output": "spawn_node_disabled.out" }, // A real `node` already on PATH must never be shadowed by the shim. "real_node_not_shadowed": { "if": "unix", "args": "run -A real_node_not_shadowed.mjs", "output": "real_node_not_shadowed.out" } } }