Skip to main content

pending_patch_dir

Function pending_patch_dir 

Source
pub fn pending_patch_dir() -> Result<PathBuf, Error>
Expand description

The directory pending inline-snapshot patches are written to and read from: target/test-better-pending/ under the workspace root.

The workspace root is found by walking up from the current directory to the nearest ancestor containing a Cargo.lock; CARGO_TARGET_DIR, if set, overrides the target location. Both the test process (writing) and the test-better-accept binary (reading) resolve it the same way.

ยงErrors

Returns an std::io::Error if the current directory cannot be read or no Cargo.lock is found in any ancestor.