Decorate default Jasmine matchers to provide additional diff output in error messages.
Jasmine Diff takes the standard Jasmine matchers and decorates them, adding diff output where it makes sense, i.e., when comparing objects, arrays and long strings, where noticing differences by eye with the standard Jasmine output can be cumbersome. By tackling this problem directly at the matcher level, this plugin should be compatible with all of your favorite Jasmine reporters.
Install using npm:
$ npm install jasmine-diff --save-dev
Or for a manual/browser installation, grab the pre-built jasmine-diff.js and embed after Jasmine but before your tests.
Integrate the matchers with your test environment (currently only Jasmine 2.x supported):
colors (boolean, default:
Enables colored diff output.
inline (boolean, default:
Display inline diffs (best paired with
- Use background colors for
- Fix actual/expected order in default matcher output (#6)
- Fix colors bleeding into line numbers (#5)
- Initial release