Skip to content

Commit 9746132

Browse files
authored
add threshold to readme
1 parent 4017f9b commit 9746132

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ let niffy = new Niffy(basehost, testhost, nightmareOptions);
2424
* `basehost` is the url that is assumed "good"
2525
* `testhost` is the url that you are comparing to the base
2626
* `nightmareOptions` can be seen [here in the Nightmare docs](https://github.com/segmentio/nightmare#nightmareoptions)
27+
* `.threshold` is the maximum percentage difference for a passing test (default: 0.2%)
2728

2829
### .test(url[, fn])
2930
This method instructs niffy to go to a `url` (and optionally take additional actions like clicking, typing or checkboxing via the `fn` argument), and test `basehost` vs. `testhost` screenshots for pixel differences, and output the diff-highlight image. Typically you'll use `.test(url, fn)` in the body of a mocha test, like this:

0 commit comments

Comments
 (0)