Skip to content

Commit 23c64e5

Browse files
committed
Script & instruction for image diff reporting
1 parent 17ac2ae commit 23c64e5

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

parley/tests/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
report.html

parley/tests/README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,8 @@ If you think that everything is ok, you can start tests as follows:
1313
$ PARLEY_TEST="accept" cargo test
1414
```
1515

16-
It will update snapshots of the failed tests.
16+
It will update snapshots of the failed tests.
17+
18+
## Report with diffs
19+
20+
If you want to create a nice report with image diffs, run `make_report.sh`

parley/tests/make_report.sh

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
if ! command -v image_diff_review 2>&1 >/dev/null
4+
then
5+
echo "image_diff_review not found. Install it via 'cargo install image_diff_review'"
6+
exit 1
7+
fi
8+
9+
image_diff_review --ignore-left-missing --left-title "Current test" --right-title "Snaphost" current snapshots report

0 commit comments

Comments
 (0)