Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jasmine-diff

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jasmine-diff

Jasmine diff matchers

  • 0.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9K
decreased by-61.74%
Maintainers
1
Weekly downloads
 
Created
Source

Jasmine Diff

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

npm Version Build Status Test Coverage Dependency Status

screenshot

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.

Installation

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.

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).

Changelog

0.1.3
  • Use background colors for inline:true, colors:true (#8)
0.1.2
  • Fix actual/expected order in default matcher output (#6)
0.1.1
  • Fix colors bleeding into line numbers (#5)
0.1.0
  • Initial release

License

MIT

Keywords

FAQs

Package last updated on 06 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc