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.1
  • Source
  • npm
  • Socket score

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

karma-chai

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

Installation

Note: there is a bug in chai-immutable that prevents it from working with karma. I've created a fork that you can use until it's fixed: https://github.com/jakelazaroff/chai-immutable

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

Keywords

FAQs

Package last updated on 12 Dec 2015

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