insta icon indicating copy to clipboard operation
insta copied to clipboard

Support test execution with Miri

Open farnoy opened this issue 2 years ago • 4 comments

I'm using inline snapshots and INSTA_UPDATE=no. My tests otherwise work with Miri, they're only failing because of assert_snapshot!

The root cause seems to be trying to parse the Cargo manifest for ToolConfig. This is after working around auto-discovery issues with INSTA_WORKSPACE_ROOT - insta::env::ToolConfig::from_workspace

Looking at what ToolConfig does, it seems to be possible to come up with default values for cfg!(miri), like not updating the snapshots, etc.

farnoy avatar Nov 25 '23 20:11 farnoy

I'm not sure what a good solution here is, but I'm happy to accept a patch.

mitsuhiko avatar Nov 27 '23 13:11 mitsuhiko