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
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,13 +18,14 @@ Niffy is built on [Nightmare](https://github.com/segmentio/nightmare) and used i
18
18
To create a new Niffy differ:
19
19
20
20
```js
21
-
let niffy =newNiffy(basehost, testhost, nightmareOptions);
21
+
let niffy =newNiffy(basehost, testhost, options);
22
22
```
23
23
24
24
*`basehost` is the url that is assumed "good"
25
25
*`testhost` is the url that you are comparing to the base
26
-
*`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%)
26
+
*`options` aside from the few specific niffy options, all nightmare options can be used. They can be seen [here in the Nightmare docs](https://github.com/segmentio/nightmare#nightmareoptions)
27
+
*`pngPath` is the folder the screenshots will be saved. It defaults to `./niffy`
28
+
*`threshold` is the maximum percentage difference for a passing test (default: 0.2%)
28
29
29
30
### .test(url[, fn])
30
31
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