Commit 0492491
authored
refactor(tests): split and improve snapshot test infrastructure (#99)
## Summary
- Split `test_snapshots` into separate `plan_snapshots` (vite_task_plan) and `e2e_snapshots` (vite_task_bin) test suites
- Move snapshots to per-fixture directories for better organization
- Remove redundant task graph snapshots from e2e tests (now only in plan tests)
- Rename test directories for clarity (`test_snapshots` → `e2e_snapshots`, `test_plan_snapshots` → `plan_snapshots`)
- Disable libtest harness for both test suites (using custom `main()`)
- Add stdin support for e2e test steps (allows `{ cmd = "...", stdin = "..." }` syntax)
- Add CLI filter argument for running specific fixtures (`cargo test --test e2e_snapshots -- stdin`)
## Test plan
- [x] `cargo test -p vite_task_bin --test e2e_snapshots` passes
- [x] `cargo test -p vite_task_plan --test plan_snapshots` passes
- [x] Filter argument works: `cargo test -p vite_task_bin --test e2e_snapshots -- stdin`
🤖 Generated with [Claude Code](https://claude.com/claude-code)1 parent c9750b2 commit 0492491
File tree
155 files changed
+537
-1023
lines changed- crates
- fspy/tests
- vite_task_bin
- test_bins
- tests
- e2e_snapshots
- fixtures
- cache-disabled
- snapshots
- cache-miss-reasons
- snapshots
- e2e-env-test
- snapshots
- e2e-lint-cache
- snapshots
- error_cycle_dependency
- snapshots
- exit-codes
- packages
- pkg-a
- pkg-b
- snapshots
- stdin-passthrough
- snapshots
- vite-task-smoke
- snapshots
- test_snapshots
- fixtures/transitive-dependency-workspace
- packages
- another-a
- a
- src
- b1
- b2
- c
- snapshots
- vite_task_plan
- tests/plan_snapshots
- fixtures
- additional-envs
- snapshots
- cache-keys
- snapshots
- cache-sharing
- snapshots
- comprehensive-task-graph
- packages
- api
- app
- config
- pkg#special
- tools
- ui
- snapshots
- conflict-test
- packages
- scope-a-b
- scope-a
- test-package
- snapshots
- dependency-both-topo-and-explicit
- packages
- a
- b
- snapshots
- empty-package-test
- packages
- another-empty
- empty-name
- normal-package
- snapshots
- explicit-deps-workspace
- packages
- app
- core
- utils
- snapshots
- fingerprint-ignore-test
- snapshots
- recursive-topological-workspace
- apps/web
- packages
- app
- core
- utils
- snapshots
- synthetic-in-subpackage
- packages/a
- snapshots
- packages/tools
- src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
155 files changed
+537
-1023
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
19 | | - | |
| 21 | + | |
20 | 22 | | |
21 | | - | |
22 | | - | |
23 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
30 | | - | |
31 | | - | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | | - | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
37 | | - | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | 30 | | |
32 | 31 | | |
33 | | - | |
34 | 32 | | |
35 | | - | |
36 | 33 | | |
37 | | - | |
38 | 34 | | |
39 | 35 | | |
40 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
This file was deleted.
0 commit comments