Skip to content
 
 

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jasmine Diff

Decorate default Jasmine matchers to provide additional diff output in error messages.

npm Version Build Status Test Coverage Dependency Status

Jasmine Diff takes the standard Jasmine matchers and decorates them, adding diff output where it makes sense, i.e., when comparing objects and arrays 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.

Installation

Install using npm:

$ npm install jasmine-diff --save-dev

Or for a manual/browser installation, grab the pre-built [jasmine-diff.js][dist/jasmine-diff.js] and embed after Jasmine but before your tests.

Usage

Integrate the matchers with your test environment (currently only Jasmine 2.x supported):

beforeEach(function () {
  jasmine.addMatchers(require('jasmine-diff')(jasmine, {
    // Specify options here
  }))
})

Available Options

colors (boolean, default: false)

Enables colored diff output.

inline (boolean, default: false)

Display inline diffs (best paired with colors:true).

License

MIT

About

Override default Jasmine matchers to provide additional diff output

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages