diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c7720d8..568c9b20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,13 +4,15 @@ All notable changes to insta and cargo-insta are documented here. ## 1.30.0 +- Snapshots are accepted when running with `--accept` even if a test outside + insta fails. (#358) - Mark settings drop guard as `#[must_use]`. - Write inline snapshots with atomic rename to avoid some rare races. (#373) - Pass `--color=...` to libtest to propagate color choices in more situations. (#375) ## 1.29.0 -- Fixed a rednering bug with snapshot display (lines were not +- Fixed a rendering bug with snapshot display (lines were not rendered to the terminal width). - Added `--exclude` option to `cargo insta test`. (#360) - Inherit `color` option from a `CARGO_TERM_COLOR` environment variable (#361) diff --git a/cargo-insta/src/cli.rs b/cargo-insta/src/cli.rs index 9878908a..2c100b7e 100644 --- a/cargo-insta/src/cli.rs +++ b/cargo-insta/src/cli.rs @@ -605,18 +605,11 @@ fn test_run(mut cmd: TestCommand, color: &str) -> Result<(), Box> { success = success && proc.status()?.success(); } - if !success { - if cmd.review { - eprintln!( - "{} non snapshot tests failed, skipping review", - style("warning:").bold().yellow() - ); - } else if cmd.accept { - eprintln!( - "{} non snapshot tests failed, not accepted changes", - style("warning:").bold().yellow() - ); - } + if !success && cmd.review { + eprintln!( + "{} non snapshot tests failed, skipping review", + style("warning:").bold().yellow() + ); return Err(QuietExit(1).into()); }