turbo
bf730d5e - refactor: Migrate daemon, jsonc, query, edit-turbo-json tests to Rust (#12016)

Commit
92 days ago
refactor: Migrate daemon, jsonc, query, edit-turbo-json tests to Rust (#12016) ## Summary - Converts 6 prysk tests to pure Rust: `daemon/verbosity.t`, `jsonc/turbo-jsonc.t`, `query/variables.t`, `query/validation.t`, `edit-turbo-json/global.t`, `edit-turbo-json/task.t` - Prysk count drops from 130 to 124 ## Test mapping | Old .t file | New Rust test(s) | Pattern | |---|---|---| | `daemon/verbosity.t` | 3 tests | `assert!(contains)` for `[DEBUG]` and daemon status message | | `jsonc/turbo-jsonc.t` | 5 tests | Exit code + error message checks for config conflicts, success checks for valid configs | | `query/variables.t` | 3 tests | JSON output equality, error message check | | `query/validation.t` | 2 tests | Build fails → query succeeds with `insta::assert_json_snapshot!` | | `edit-turbo-json/task.t` | 1 test | Exact task hash assertions across 5 config swaps | | `edit-turbo-json/global.t` | 1 test | `globalCacheInputs` comparison across 6 config swaps | ## Notable fix `edit-turbo-json/global.t` was a no-op in the prysk setup. It used `find_global_hash.sh` which greps debug output for `"global hash: value=<hex>"` — a format from Go turbo that Rust turbo doesn't produce. All extractions returned empty strings, and bash's unquoted `test $A != $B` with empty vars expands to `test !=` (always true). The new test validates the same invariants using `globalCacheInputs` from `--dry=json`. ## How to verify ```bash cargo nextest run --test daemon_test --test jsonc_test --test edit_turbo_json --test query_test -p turbo ```
Author
Parents
Loading