-
-
Notifications
You must be signed in to change notification settings - Fork 130
Allow passing args through to test binary with nextest #796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Pass `cargo insta test -- --status-level fail -- --nocapture`, with an additional `--` for args to nextest. Currently it maintains backward compat -- a single `--` will pass to the test binary only, with a depreciation. (for transparency, Claude Code helped with the code)
- Install cargo-nextest in Makefile if not present before running cargo-insta tests - This ensures CI has nextest available for the new tests - Tests will panic with helpful message if nextest is missing locally
- Add nextest installation to all test jobs that might run cargo-insta tests - Uses taiki-e/install-action@nextest for efficient installation - Ensures nextest is available for the new test suite
Changed footnote reference format from [1]: to [^1]: to match the reference [^1] used in the text.
|
Thanks for working on this! I'm not sure the double |
I considered this. but then would (and then less keen on adding options to insta to track all of nextest's) |
I was thinking of But both examples you're showing are good enough IMO. I would be more uncomfortable with Anyway, that's probably a matter of taste. In the end, any solution would work for me 👍 |
Documents the new ability to pass arguments to both nextest and test binaries using the additional separator pattern.
- Remove unnecessary argument splitting logic - Pass all args as opaque list to nextest, let it handle its own separator - Use decisive comments that describe what IS, not history - Cleaner conditional logic without complex tuple destructuring
- Add test for backward compatibility with single separator - Add test verifying args go to nextest with double separator - Inline has_additional_separator check where it's used - Tests now cover all argument routing scenarios
Resolved changelog conflict by keeping both entries: - Our nextest argument passing feature - The 1-based line numbering change from master
- Explain that backward compat works via nextest's test filter behavior - Update changelog to note that only unrecognized args work as test filters - Enhance deprecation warning to explain the mechanism - Add detailed code comments about the argument routing strategy - Clarify that nextest-specific flags would be consumed by nextest
|
on reflection, this code is overly complicated and would be much simpler if we didn't run doctests separately. so I got around to doing #803, and we can merge a version of this when we've removed the supplemental doctest run |
Pass args to nextest and test binary with two
--— every after the first--goes to nextest, and nextest passes everything after the second--to the test binary.For example,
cargo insta test -- --status-level fail -- --nocaptureCurrently it maintains backward compat -- a single
--will pass to the test binary only, with a depreciation warning. eventually that'll pass them to nextest only.(for transparency, Claude Code helped with the code)