1 | # JsDiff with console output
|
2 | > Compares JS hashes using JsDiff and outputs the result on the console
|
3 |
|
4 | [![CircleCI](https://circleci.com/gh/kevgo/jsdiff-console.svg?style=shield)](https://circleci.com/gh/kevgo/jsdiff-console)
|
5 | [![Dependency Status](https://david-dm.org/kevgo/jsdiff-console.svg)](https://david-dm.org/kevgo/jsdiff-console)
|
6 | [![devDependency Status](https://david-dm.org/kevgo/jsdiff-console/dev-status.svg)](https://david-dm.org/kevgo/jsdiff-console#info=devDependencies)
|
7 |
|
8 | This is a very simple helper method for tests that require
|
9 | diffing JSON data.
|
10 | It uses the excellent [jsdiff](https://github.com/kpdecker/jsdiff) module.
|
11 | Using it in your tests is super easy:
|
12 |
|
13 | ```javascript
|
14 | diffjsConsole(actual-json, expected-json, done);
|
15 | ```
|
16 |
|
17 | The third argument is the asynchronous return method for your tests.
|
18 | JsDiff-Console will call it with the error message,
|
19 | formatted with console colors.
|
20 | Your test runner must print it to the user.
|
21 |
|
22 |
|
23 | ## Development
|
24 |
|
25 | * __run tests:__ `spec` (you need to have `watch` running for this)
|
26 | * __update dependencies:__ `update`
|
27 | * __deploy a new version:__ `publish <patch|minor|major>` (deployment happens via CI and might take a few minutes)
|