jasmine-immutablejs-matchers
Jasmine matchers for Immutable.js
This package provides 2 matchers toBeImmutable
and toEqualImmutable
for testing and verifying Immutable objects for Jasmine 2.x
Requirements
- Jasmine 2.x
Installation
Install via npm:
npm install jasmine-immutablejs-matchers
Usage
Node.js
Require into your tests and use:
; ;
Browser
<script src="/node_modules/jasmine-immutablejs-matchers/index.js"></script>
Matchers
toBeImmutable() - confirm Immutability
var data = Immutable;;
toEqualImmutable() - confirm equality / inequalitiy
var data = Immutable;; var obj = 'a': 1 'b': 2;var data = Immutable;not;
Credits
toEqualImmutable
based on theis
matcher straight from Lee Byron's gist- Joel Lanciaux
- Ryan Lanciaux
- Jeff Barczewski