UNPKG

628 BMarkdownView Raw
1# JsDiff with console output [![Dependency Status](https://david-dm.org/kevgo/jsdiff-console.svg)](https://david-dm.org/kevgo/jsdiff-console)
2
3This is a very simple helper method for tests that require
4diffing JSON data.
5It uses the excellent [jsdiff](https://github.com/kpdecker/jsdiff) module.
6
7Using it in your tests is super easy:
8
9```livescript
10require! 'diffjs-console'
11
12diffjs-console actual-json, expected-json
13```
14
15You can provide an async return method as the third argument
16to have your tests automatically fail if the data structures are different.
17
18```livescript
19diffjs-console actual-json, expected-json, done
20```