0.0.2 • Published 9 years ago
karma-jasmine-shallow-equal v0.0.2
karma-jasmine-shallow-equal
From Michel Salib's implementation for chai
(https://github.com/michelsalib/chai-shallow-deep-equal/): Implementation as a karma framework plugin.
Will shallowly perform a deep equal assertion in an object graph.
Installation
Direct install:
npm install karma-jasmine-shallow-equal --save-dev
Reference as dev dependencies in package.json of your project:
...
"devDependencies": {
"karma-jasmine-shallow-equal": "~x.x.x"
}
...
Reference in karma.conf.js:
...
frameworks: ['jasmine', 'jasmine-shallow-equal']
...
Example
expect({
name: 'Michel',
language: 'javascript',
tags: ['developer', 'gamer']
}).toShallowEqual({
name: 'Michel',
tags: ['developer']
});
More example here: Unit Tests