Skip to content

cargo insta test --all-targets exits with an error when there are doctests #460

@ilyagr

Description

@ilyagr

What happened?

Fortunately, the error occurs after all the tests are run. So, a human being looking at the output will know to ignore it. However, cargo-insta does exit with a non-zero error code in this situation.

Cc #438 and #408. With #438, adding --disable-nextest-doctest fixes the problem (though I wouldn't call this an elegant fix).

Reproduction steps

  1. Clone https://github.com/martinvonz/jj/tree/3bbc3e5715eba28e79dad7528ccd8e9bc37b505b
  2. Run cargo insta test --accept --workspace --all-targets --test-runner nextest
  3. Observe the error at the end:
...
error: Can't mix --doc with other target selecting options
done: no snapshots to review

Insta Version

cargo-insta-test 1.36.1

rustc Version

rustc 1.78.0-nightly (3cbb93223 2024-03-13) binary: rustc commit-hash: 3cbb93223f33024db464a4df27a13c7cce870173

What did you expect?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions