Skip to content

Commit

Permalink
Fix test_runner in config
Browse files Browse the repository at this point in the history
This was previously ignored.

Stacks on mitsuhiko#521 to avoid conflicts; merge that first
  • Loading branch information
max-sixty committed Jul 31, 2024
1 parent 5fc57a1 commit f3cbd5b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cargo-insta/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -610,8 +610,14 @@ fn test_run(mut cmd: TestCommand, color: ColorWhen) -> Result<(), Box<dyn Error>
cmd.unreferenced = UnreferencedSnapshots::Delete;
}

let test_runner = match cmd.test_runner {
TestRunner::Auto => loc.tool_config.test_runner(),
TestRunner::CargoTest => TestRunner::CargoTest,
TestRunner::Nextest => TestRunner::Nextest,
};

let (mut proc, snapshot_ref_file, prevents_doc_run) =
prepare_test_runner(cmd.test_runner, cmd.unreferenced, &cmd, color, &[], None)?;
prepare_test_runner(test_runner, cmd.unreferenced, &cmd, color, &[], None)?;

if !cmd.keep_pending {
process_snapshots(true, None, &loc, Some(Operation::Reject))?;
Expand Down

0 comments on commit f3cbd5b

Please sign in to comment.