1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 23:34:47 -05:00
denoland-deno/tests/specs/task/byonm/__test__.jsonc
Nathan Whitaker a4c76add56
fix(cli): Respect implied BYONM from DENO_FUTURE in deno task (#24652)
Regression from
04f9db5b22

Originally I thought to fix the issue in the PR we needed to explicitly
pass through the `node-modules-dir` flag, but after applying the correct
fix that david pointed out (setting `NPM_PROCESS_STATE`) that wasn't
necessary (or correct).

We had a test for deno task with BYONM, but it only tested with
`"unstable": ["byonm"]` in deno.json, so it didn't catch this.
2024-07-19 18:59:04 +00:00

54 lines
1.3 KiB
Text

{
"tempDir": true,
"tests": {
"deno_json": {
"steps": [{
"commandName": "npm",
"args": "install",
"output": "[WILDCARD]"
}, {
"args": "task say",
"output": "package_json_say.out"
}, {
"args": "task think",
"output": "package_json_think.out"
}, {
"args": "task deno-say",
"output": "deno_json_say.out"
}, {
"args": "task deno-think",
"output": "deno_json_think.out"
}]
},
"no_deno_json": {
"steps": [{
"args": [
"eval",
"Deno.removeSync('deno.json')"
],
"output": ""
}, {
"commandName": "npm",
"args": "install",
"output": "[WILDCARD]"
}, {
// implied byonm from DENO_FUTURE
"envs": {
"DENO_FUTURE": "1"
},
"args": "task say",
"output": "package_json_say.out"
}, {
// byonm flag
"args": "task --unstable-byonm say",
"output": "package_json_say.out"
}, {
"args": [
"eval",
"try { Deno.statSync('node_modules/.deno'); } catch (e) { if (e instanceof Deno.errors.NotFound) { console.log('good'); } else { throw new Error('bad'); } }"
],
"output": "good\n"
}]
}
}
}