Socket
Socket
Sign inDemoInstall

pivotal-js-jasmine-matchers

Package Overview
Dependencies
3
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    pivotal-js-jasmine-matchers

Collection of Jasmine matchers


Version published
Maintainers
3
Install size
156 kB
Created

Readme

Source

Jasmine Matchers

npm install pivotal-js-jasmine-matchers --save-dev

In your spec helper,

require('pivotal-js-jasmine-matchers');

Jasmine matcher libraries

Request Matchers

For use with jasmine-ajax

  • toHaveBeenRequested() expect('run.pivotal.io').toHaveBeenRequested();
  • toHaveBeenRequestedWithQuery(query) expect('run.pivotal.io').toHaveBeenRequestWithQuery({page: 2, perPage: 50});
  • toHaveBeenRequestedWith(requestObject) expect('run.pivotal.io').toHaveBeenRequestedWith({method: 'POST', requestHeaders: 'let me in'})

Math Matchers

  • toAlmostEqual(expected, precision)

    Compares the actual and expected, to precision decimal places. Precision defaults to 5.

    expect(2.000001).toAlmostEqual(2, 4);

React Matchers

  • toHaveBeenRenderedWithProps()

    expect(MyComponent).toHaveBeenRenderedWithProps({expanded: true});

FAQs

Last updated on 19 Jun 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc