Repository navigation
Commit b36c8c6
authored
test(rust): add filesystem fixture support (#1136)
* test(rust): add filesystem fixture support
Add an internal ccusage-test-support crate that wraps assert_fs TempDir for Rust tests. The helper provides an fs_fixture! macro for inline fixture trees and a Fixture type for incremental setup, so tests can rely on drop-based cleanup instead of hand-rolled env::temp_dir paths.
Use the helper in representative ccusage tests to exercise both the macro and incremental setup patterns. This gives future Rust fixture tests a concrete local example while preserving existing test behavior.
* docs(skills): fold fixture guidance into test skills
Move TypeScript fs-fixture guidance out of a standalone skill and into the Vitest reference, where it is used. Document the new Rust filesystem fixture helper in ccusage-testing so agents can find the Rust workflow from the Rust test skill.
Remove the root skill routing entry for fs-fixture because the dedicated skill is no longer the right discovery surface.
* test(rust): tighten fixture helper polish
Add must_use annotations to fixture helper methods that return paths so accidental ignored path values are visible during test development.
Remove the hardcoded fs-fixture pnpm version from the Vitest reference and keep the version-agnostic lookup command instead.1 parent d96cb92 commit b36c8c6
10 files changed
Lines changed: 385 additions & 68 deletions
File tree
- .agents/skills
- ccusage-testing
- ccusage-typescript/references
- fs-fixture
- rust
- crates
- ccusage-test-support
- src
- ccusage
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
36 | 70 | | |
37 | 71 | | |
38 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
24 | 48 | | |
25 | 49 | | |
26 | 50 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
0 commit comments