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

karma-chai-immutable

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

karma-chai-immutable

Chai and Immutable for Karma

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
238
decreased by-10.19%
Maintainers
1
Weekly downloads
 
Created
Source

karma-chai-immutable

npm

Makes the chai-immutable adapter for Chai and Immutable available in Karma

Installation

$ npm install karma-chai-immutable --save-dev

Add chai-immutable to the frameworks key in your Karma configuration:

module.exports = function(config) {
  'use strict';
  config.set({
    frameworks: ['mocha', 'chai-immutable'],
    #...
  });
}

Usage

Chai matchers for Immutable are available in tests:

describe('chai-immutable', function () {

  it('can compare objects', function () {
    var a = Immutable.Map({key: 'value'}),
        b = a.merge({key: 'value'}),
        c = a.merge({key: 'other value'});

    a.should.equal(b);
    a.should.not.equal(c);
  });

  it('can check if an Immutable is empty', function () {
    Immutable.List().should.be.empty;
  });
});

See chai-immutable for full documentation.

Thanks

Cheers to chai-immutable and karma!

Keywords

FAQs

Package last updated on 07 Sep 2016

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