Skip to content

Commit 779a98c

Browse files
tests: enable specs::run::package_json::invalid_value (#25826)
Towards #25241 Co-authored-by: David Sherret <[email protected]>
1 parent e41df20 commit 779a98c

File tree

6 files changed

+48
-15
lines changed

6 files changed

+48
-15
lines changed
Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,54 @@
11
{
22
"tempDir": true,
3-
// TODO(2.0): update the tests, should probably run install first
4-
"ignore": true,
53
"tests": {
64
// should run fine when not referencing a failing dep entry
7-
"run_ok": {
8-
"args": "run ok.ts",
5+
"run_ok_auto": {
6+
"args": "run --quiet --node-modules-dir=auto ok.ts",
97
"output": "ok.ts.out"
108
},
9+
"run_ok_byonm": {
10+
"steps": [
11+
{
12+
"args": "install",
13+
"output": "install.out"
14+
},
15+
{
16+
"args": "run ok.ts",
17+
"output": "ok.ts.out"
18+
}
19+
]
20+
},
1121
// should fail when referencing a failing dep entry
12-
"run_error": {
13-
"args": "run error.ts",
22+
"run_error_auto": {
23+
"args": "run --node-modules-dir=auto error.ts",
1424
"exitCode": 1,
15-
"output": "error.ts.out"
25+
"output": "error_auto.out"
26+
},
27+
"run_error_byonm": {
28+
"steps": [
29+
{
30+
"args": "install",
31+
"output": "install.out"
32+
},
33+
{
34+
"args": "run error.ts",
35+
"exitCode": 1,
36+
"output": "error.out"
37+
}
38+
]
1639
},
1740
// should output a warning about the failing dep entry
1841
"task_test": {
19-
"args": "task test",
20-
"output": "task.out"
42+
"steps": [
43+
{
44+
"args": "install",
45+
"output": "install.out"
46+
},
47+
{
48+
"args": "task test",
49+
"output": "task.out"
50+
}
51+
]
2152
}
2253
}
2354
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
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`?
2+
at file:///[WILDCARD]/error.ts:2:23

tests/specs/run/package_json/invalid_value/error.ts.out renamed to tests/specs/run/package_json/invalid_value/error_auto.out

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
Download http://localhost:4260/@denotest/esm-basic
2+
Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz
3+
Initialize @denotest/[email protected]
14
error: Invalid version requirement
25
0: Unexpected character.
36
invalid stuff that won't parse
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Download http://localhost:4260/@denotest/esm-basic
2+
Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz
3+
Initialize @denotest/[email protected]
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
Download http://localhost:4260/@denotest/esm-basic
2-
Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz
3-
Initialize @denotest/[email protected]
41
2
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
Download http://localhost:4260/@denotest/esm-basic
2-
Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz
3-
Initialize @denotest/[email protected]
41
Task test echo 1
52
1

0 commit comments

Comments
 (0)