1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

tests: enable specs::run::package_json::invalid_value (#25826)

Towards https://github.com/denoland/deno/issues/25241

Co-authored-by: David Sherret <dsherret@gmail.com>
This commit is contained in:
Satya Rohith 2024-10-03 21:56:55 +05:30 committed by GitHub
parent e41df20ad9
commit 779a98cd39
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 48 additions and 15 deletions

View file

@ -1,23 +1,54 @@
{ {
"tempDir": true, "tempDir": true,
// TODO(2.0): update the tests, should probably run install first
"ignore": true,
"tests": { "tests": {
// should run fine when not referencing a failing dep entry // should run fine when not referencing a failing dep entry
"run_ok": { "run_ok_auto": {
"args": "run ok.ts", "args": "run --quiet --node-modules-dir=auto ok.ts",
"output": "ok.ts.out" "output": "ok.ts.out"
}, },
"run_ok_byonm": {
"steps": [
{
"args": "install",
"output": "install.out"
},
{
"args": "run ok.ts",
"output": "ok.ts.out"
}
]
},
// should fail when referencing a failing dep entry // should fail when referencing a failing dep entry
"run_error": { "run_error_auto": {
"args": "run error.ts", "args": "run --node-modules-dir=auto error.ts",
"exitCode": 1, "exitCode": 1,
"output": "error.ts.out" "output": "error_auto.out"
},
"run_error_byonm": {
"steps": [
{
"args": "install",
"output": "install.out"
},
{
"args": "run error.ts",
"exitCode": 1,
"output": "error.out"
}
]
}, },
// should output a warning about the failing dep entry // should output a warning about the failing dep entry
"task_test": { "task_test": {
"args": "task test", "steps": [
"output": "task.out" {
"args": "install",
"output": "install.out"
},
{
"args": "task test",
"output": "task.out"
}
]
} }
} }
} }

View file

@ -0,0 +1,2 @@
error: Could not resolve "@denotest/cjs-default-export", but found it in a package.json. Deno expects the node_modules/ directory to be up to date. Did you forget to run `deno install`?
at file:///[WILDCARD]/error.ts:2:23

View file

@ -1,3 +1,6 @@
Download http://localhost:4260/@denotest/esm-basic
Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz
Initialize @denotest/esm-basic@1.0.0
error: Invalid version requirement error: Invalid version requirement
0: Unexpected character. 0: Unexpected character.
invalid stuff that won't parse invalid stuff that won't parse

View file

@ -0,0 +1,3 @@
Download http://localhost:4260/@denotest/esm-basic
Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz
Initialize @denotest/esm-basic@1.0.0

View file

@ -1,4 +1 @@
Download http://localhost:4260/@denotest/esm-basic
Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz
Initialize @denotest/esm-basic@1.0.0
2 2

View file

@ -1,5 +1,2 @@
Download http://localhost:4260/@denotest/esm-basic
Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz
Initialize @denotest/esm-basic@1.0.0
Task test echo 1 Task test echo 1
1 1