Commit d19333d
refactor(test): use markdown for e2e snapshots (#342)
## Motivation
Render e2e snapshots as markdown so human review — on GitHub and in
editors — benefits from syntax highlighting and structural rendering.
The old `.snap` format packed everything into a custom line-prefix
convention (`[code]> cmd # comment`) that editors couldn't highlight and
diffs had to be read without any visual grouping. Each step is now an
`##` section with the command in backticks, comment and optional `**Exit
code:**` line, and a fenced code block for the redacted output;
interactions are bolded labels interleaved with fenced screen captures;
each file opens with an `#` heading carrying the case name.
## Changes
-
[crates/vite_task_bin/tests/e2e_snapshots/main.rs](crates/vite_task_bin/tests/e2e_snapshots/main.rs):
split display_command into command-line + comment accessors; rewrite the
interaction-loop and output-formatting blocks to emit markdown; change
snapshot extension from .snap to .md; add push_fenced_block helper.
- [.gitignore](.gitignore): add *.md.new alongside existing *.snap.new
so the mismatch fallback file is ignored.
- Regenerated all 148 e2e snapshots in the new format.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 2d44be3 commit d19333d
291 files changed
Lines changed: 3572 additions & 1185 deletions
File tree
- crates/vite_task_bin/tests/e2e_snapshots
- fixtures
- associate_existing_cache
- snapshots
- builtin_different_cwd
- snapshots
- cache_disabled
- snapshots
- cache_miss_command_change
- snapshots
- cache_miss_reasons
- snapshots
- cache_subcommand/snapshots
- cache_task_select/snapshots
- colon_in_name
- snapshots
- concurrent_execution
- snapshots
- ctrl_c
- snapshots
- error_cycle_dependency
- snapshots
- exit_codes
- snapshots
- filter_unmatched
- snapshots
- glob_base_test
- snapshots
- grouped_stdio
- snapshots
- individual_cache_for_adt_args
- snapshots
- individual_cache_for_env
- snapshots
- input_cache_test
- snapshots
- input_glob_meta_in_path
- snapshots
- input_negative_glob_subpackage
- snapshots
- input_read_write_not_cached
- snapshots
- interleaved_stdio
- snapshots
- labeled_stdio
- snapshots
- malformed_fspy_path
- snapshots
- parallel_execution
- snapshots
- pass_args_to_task
- snapshots
- signal_exit
- snapshots
- summary_output
- snapshots
- task_list/snapshots
- task_no_trailing_newline
- snapshots
- task_select_truncate
- snapshots
- task_select
- snapshots
- topological_execution_order
- snapshots
- vite_task_smoke
- snapshots
- workspace_root_self_reference
- snapshots
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
| |||
Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
2 | 10 | | |
3 | 11 | | |
4 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
5 | 19 | | |
6 | 20 | | |
7 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
8 | 28 | | |
9 | 29 | | |
10 | 30 | | |
11 | 31 | | |
12 | 32 | | |
13 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
14 | 40 | | |
15 | 41 | | |
16 | 42 | | |
17 | 43 | | |
18 | 44 | | |
| 45 | + | |
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
| |||
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
0 commit comments