Usage
Write a test:
Update the snapshot file before the first test:
UPDATE_SNAPSHOTS=yes
Assert that current contents matches the contents of the snapshot file:
Diffing Engine
We use the same excellent diffing engine that insta is using. But since we allow custom snapshot file extensions we do not suffer from Consider ways to avoid conflicts with Jest snapshots for external tools (like GitHub Linguist). That bug makes GitHub diffs horrible. Unfortunately the .gitattributes
workaround does not work.
Audit the Code
This crate is ~30 lines of code. Audit with the following one-liner, but make sure you follow to the crates.io Data Access Policy:
|
|