Skip to content

Commit b4fd1d7

Browse files
branchseerclaude
andcommitted
fix: use vp run instead of vite run in e2e test fixtures
The e2e test harness only adds the vp binary to PATH, not vite. Using vite run caused "command not found" errors with platform-specific messages that broke cross-platform snapshot matching. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0cb68a1 commit b4fd1d7

27 files changed

Lines changed: 234 additions & 144 deletions

crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots.toml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,82 +6,82 @@
66
[[e2e]]
77
name = "root glob - matches src files"
88
steps = [
9-
"vite run root-glob-test",
9+
"vp run root-glob-test",
1010
# Modify matched file
1111
"replace-file-content src/root.ts initial modified",
1212
# Cache miss: file matches glob
13-
"vite run root-glob-test",
13+
"vp run root-glob-test",
1414
]
1515

1616
[[e2e]]
1717
name = "root glob - unmatched directory"
1818
steps = [
19-
"vite run root-glob-test",
19+
"vp run root-glob-test",
2020
# Modify file outside glob pattern
2121
"replace-file-content other/other.ts initial modified",
2222
# Cache hit: file doesn't match glob
23-
"vite run root-glob-test",
23+
"vp run root-glob-test",
2424
]
2525

2626
[[e2e]]
2727
name = "root glob - subpackage path unmatched by relative glob"
2828
steps = [
29-
"vite run root-glob-test",
29+
"vp run root-glob-test",
3030
# Modify file in subpackage - relative glob src/** doesn't reach packages/sub-pkg/src/
3131
"replace-file-content packages/sub-pkg/src/sub.ts initial modified",
3232
# Cache hit: path simply doesn't match the relative glob pattern
33-
"vite run root-glob-test",
33+
"vp run root-glob-test",
3434
]
3535

3636
# 2. Root package with custom cwd - glob still relative to package root
3737
[[e2e]]
3838
name = "root glob with cwd - glob relative to package not cwd"
3939
steps = [
40-
"vite run root-glob-with-cwd",
40+
"vp run root-glob-with-cwd",
4141
# Modify file - glob is src/** relative to package root
4242
"replace-file-content src/root.ts initial modified",
4343
# Cache miss: file matches glob (relative to package, not cwd)
44-
"vite run root-glob-with-cwd",
44+
"vp run root-glob-with-cwd",
4545
]
4646

4747
# 3. Subpackage - glob matches files in subpackage's src/
4848
[[e2e]]
4949
name = "subpackage glob - matches own src files"
5050
steps = [
51-
"vite run sub-pkg#sub-glob-test",
51+
"vp run sub-pkg#sub-glob-test",
5252
# Modify matched file in subpackage
5353
"replace-file-content packages/sub-pkg/src/sub.ts initial modified",
5454
# Cache miss: file matches subpackage's glob
55-
"vite run sub-pkg#sub-glob-test",
55+
"vp run sub-pkg#sub-glob-test",
5656
]
5757

5858
[[e2e]]
5959
name = "subpackage glob - unmatched directory in subpackage"
6060
steps = [
61-
"vite run sub-pkg#sub-glob-test",
61+
"vp run sub-pkg#sub-glob-test",
6262
# Modify file outside glob pattern
6363
"replace-file-content packages/sub-pkg/other/other.ts initial modified",
6464
# Cache hit: file doesn't match glob
65-
"vite run sub-pkg#sub-glob-test",
65+
"vp run sub-pkg#sub-glob-test",
6666
]
6767

6868
[[e2e]]
6969
name = "subpackage glob - root path unmatched by relative glob"
7070
steps = [
71-
"vite run sub-pkg#sub-glob-test",
71+
"vp run sub-pkg#sub-glob-test",
7272
# Modify file in root - relative glob src/** is resolved from subpackage dir
7373
"replace-file-content src/root.ts initial modified",
7474
# Cache hit: path simply doesn't match the relative glob pattern
75-
"vite run sub-pkg#sub-glob-test",
75+
"vp run sub-pkg#sub-glob-test",
7676
]
7777

7878
# 4. Subpackage with custom cwd - glob still relative to subpackage root
7979
[[e2e]]
8080
name = "subpackage glob with cwd - glob relative to package not cwd"
8181
steps = [
82-
"vite run sub-pkg#sub-glob-with-cwd",
82+
"vp run sub-pkg#sub-glob-with-cwd",
8383
# Modify file - glob is src/** relative to subpackage root
8484
"replace-file-content packages/sub-pkg/src/sub.ts initial modified",
8585
# Cache miss: file matches glob (relative to subpackage, not cwd)
86-
"vite run sub-pkg#sub-glob-with-cwd",
86+
"vp run sub-pkg#sub-glob-with-cwd",
8787
]

crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/root glob - matches src files.snap

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
33
expression: e2e_outputs
44
---
5-
[127]> vite run root-glob-test
6-
/bin/sh: vite: command not found
5+
> vp run root-glob-test
6+
$ print-file src/root.ts
7+
export const root = 'initial';
78
> replace-file-content src/root.ts initial modified
89

9-
[127]> vite run root-glob-test
10-
/bin/sh: vite: command not found
10+
> vp run root-glob-test
11+
$ print-file src/root.tscache miss: configuration changed, executing
12+
export const root = 'modified';

crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/root glob - subpackage path unmatched by relative glob.snap

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
33
expression: e2e_outputs
44
---
5-
[127]> vite run root-glob-test
6-
/bin/sh: vite: command not found
5+
> vp run root-glob-test
6+
$ print-file src/root.ts
7+
export const root = 'initial';
78
> replace-file-content packages/sub-pkg/src/sub.ts initial modified
89

9-
[127]> vite run root-glob-test
10-
/bin/sh: vite: command not found
10+
> vp run root-glob-test
11+
$ print-file src/root.tscache hit, replaying
12+
export const root = 'initial';
13+
14+
---
15+
[vp run] cache hit, <duration> saved.

crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/root glob - unmatched directory.snap

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
33
expression: e2e_outputs
44
---
5-
[127]> vite run root-glob-test
6-
/bin/sh: vite: command not found
5+
> vp run root-glob-test
6+
$ print-file src/root.ts
7+
export const root = 'initial';
78
> replace-file-content other/other.ts initial modified
89

9-
[127]> vite run root-glob-test
10-
/bin/sh: vite: command not found
10+
> vp run root-glob-test
11+
$ print-file src/root.tscache hit, replaying
12+
export const root = 'initial';
13+
14+
---
15+
[vp run] cache hit, <duration> saved.

crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/root glob with cwd - glob relative to package not cwd.snap

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
33
expression: e2e_outputs
44
---
5-
[127]> vite run root-glob-with-cwd
6-
/bin/sh: vite: command not found
5+
> vp run root-glob-with-cwd
6+
~/src$ print-file root.ts
7+
export const root = 'initial';
78
> replace-file-content src/root.ts initial modified
89

9-
[127]> vite run root-glob-with-cwd
10-
/bin/sh: vite: command not found
10+
> vp run root-glob-with-cwd
11+
~/src$ print-file root.tscache miss: configuration changed, executing
12+
export const root = 'modified';

crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/subpackage glob - matches own src files.snap

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
33
expression: e2e_outputs
44
---
5-
[127]> vite run sub-pkg#sub-glob-test
6-
/bin/sh: vite: command not found
5+
> vp run sub-pkg#sub-glob-test
6+
~/packages/sub-pkg$ print-file src/sub.ts
7+
export const sub = 'initial';
78
> replace-file-content packages/sub-pkg/src/sub.ts initial modified
89

9-
[127]> vite run sub-pkg#sub-glob-test
10-
/bin/sh: vite: command not found
10+
> vp run sub-pkg#sub-glob-test
11+
~/packages/sub-pkg$ print-file src/sub.tscache miss: configuration changed, executing
12+
export const sub = 'modified';

crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/subpackage glob - root path unmatched by relative glob.snap

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
33
expression: e2e_outputs
44
---
5-
[127]> vite run sub-pkg#sub-glob-test
6-
/bin/sh: vite: command not found
5+
> vp run sub-pkg#sub-glob-test
6+
~/packages/sub-pkg$ print-file src/sub.ts
7+
export const sub = 'initial';
78
> replace-file-content src/root.ts initial modified
89

9-
[127]> vite run sub-pkg#sub-glob-test
10-
/bin/sh: vite: command not found
10+
> vp run sub-pkg#sub-glob-test
11+
~/packages/sub-pkg$ print-file src/sub.tscache hit, replaying
12+
export const sub = 'initial';
13+
14+
---
15+
[vp run] cache hit, <duration> saved.

crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/subpackage glob - unmatched directory in subpackage.snap

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
33
expression: e2e_outputs
44
---
5-
[127]> vite run sub-pkg#sub-glob-test
6-
/bin/sh: vite: command not found
5+
> vp run sub-pkg#sub-glob-test
6+
~/packages/sub-pkg$ print-file src/sub.ts
7+
export const sub = 'initial';
78
> replace-file-content packages/sub-pkg/other/other.ts initial modified
89

9-
[127]> vite run sub-pkg#sub-glob-test
10-
/bin/sh: vite: command not found
10+
> vp run sub-pkg#sub-glob-test
11+
~/packages/sub-pkg$ print-file src/sub.tscache hit, replaying
12+
export const sub = 'initial';
13+
14+
---
15+
[vp run] cache hit, <duration> saved.

crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/subpackage glob with cwd - glob relative to package not cwd.snap

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
33
expression: e2e_outputs
44
---
5-
[127]> vite run sub-pkg#sub-glob-with-cwd
6-
/bin/sh: vite: command not found
5+
> vp run sub-pkg#sub-glob-with-cwd
6+
~/packages/sub-pkg/src$ print-file sub.ts
7+
export const sub = 'initial';
78
> replace-file-content packages/sub-pkg/src/sub.ts initial modified
89

9-
[127]> vite run sub-pkg#sub-glob-with-cwd
10-
/bin/sh: vite: command not found
10+
> vp run sub-pkg#sub-glob-with-cwd
11+
~/packages/sub-pkg/src$ print-file sub.tscache miss: configuration changed, executing
12+
export const sub = 'modified';

0 commit comments

Comments
 (0)