You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -107,7 +107,7 @@ See [the examples](./examples/README.md) for more detailed usage or read about a
107
107
*`customDiffDir`: A custom absolute path of a directory to keep this diff in
108
108
*`customSnapshotIdentifier`: A custom name to give this snapshot. If not provided one is computed automatically. When a function is provided it is called with an object containing `testPath`, `currentTestName`, `counter` and `defaultIdentifier` as its first argument. The function must return an identifier to use for the snapshot.
109
109
*`diffDirection`: (default: `horizontal`) (options `horizontal` or `vertical`) Changes diff image layout direction
110
-
*`noColors`: (default `false`) Removes coloring from console output, useful if storing the results in a file
110
+
*`noColors`: Removes coloring from console output, useful if storing the results in a file
111
111
*`failureThreshold`: (default `0`) Sets the threshold that would trigger a test failure based on the `failureThresholdType` selected. This is different to the `customDiffConfig.threshold` above, that is the per pixel failure threshold, this is the failure threshold for the entire comparison.
112
112
*`failureThresholdType`: (default `pixel`) (options `percent` or `pixel`) Sets the type of threshold that would trigger a failure.
113
113
*`updatePassedSnapshot`: (default `false`) Updates a snapshot even if it passed the threshold against the existing one.
Copy file name to clipboardexpand all lines: __tests__/__snapshots__/index.spec.js.snap
+15
Original file line number
Diff line number
Diff line change
@@ -34,8 +34,23 @@ exports[`toMatchImageSnapshot should fail when snapshot has a difference beyond
34
34
[1m[31mSee diff for details:[39m[22m [31mpath/to/result.png[39m"
35
35
`;
36
36
37
+
exports[`toMatchImageSnapshot should not style error message if colors not supported 2`] =`
38
+
"Expected image to match or be a close match to snapshot but was 40% different from snapshot (600 differing pixels).
39
+
See diff for details: path/to/result.png"
40
+
`;
41
+
42
+
exports[`toMatchImageSnapshot should style error message if colors supported 2`] =`
43
+
"Expected image to match or be a close match to snapshot but was 40% different from snapshot (600 differing pixels).
44
+
[1m[31mSee diff for details:[39m[22m [31mpath/to/result.png[39m"
45
+
`;
46
+
37
47
exports[`toMatchImageSnapshot should throw an error if used with .not matcher 1`] =`"Jest: \`.not\` cannot be used with \`.toMatchImageSnapshot()\`."`;
38
48
49
+
exports[`toMatchImageSnapshot should use noColors options if passed as false and style error message 2`] =`
50
+
"Expected image to match or be a close match to snapshot but was 40% different from snapshot (600 differing pixels).
51
+
[1m[31mSee diff for details:[39m[22m [31mpath/to/result.png[39m"
52
+
`;
53
+
39
54
exports[`toMatchImageSnapshot should use noColors options if passed as true and not style error message 2`] =`
40
55
"Expected image to match or be a close match to snapshot but was 40% different from snapshot (600 differing pixels).
0 commit comments