zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
49.44k stars 3.01k forks source link

Test runner: Ability to customize test command #18398

Open ytham opened 1 month ago

ytham commented 1 month ago

Check for existing issues

Describe the feature

I'd like the ability to customize the test runner command so that it can display backtraces. Right now, when I click the ▷ symbol next to a Rust test, it will run

cargo test -p <crate> <testname> -- --nocapture

But it'd sure be nice to be able to add/remove flags, tmp env vars, etc.

If applicable, add mockups / screenshots to help present your vision of the feature

No response

notpeter commented 3 weeks ago

I think you might be able to do this by creating a task and then adding "tags": ["rust-test"] to it.

See: Binding runnable tags to task templates in the docs.