Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gghez/karma-jasmine-shallow-equal
Jasmine matcher for karma test launcher
https://github.com/gghez/karma-jasmine-shallow-equal
Last synced: about 1 month ago
JSON representation
Jasmine matcher for karma test launcher
- Host: GitHub
- URL: https://github.com/gghez/karma-jasmine-shallow-equal
- Owner: gghez
- Created: 2015-02-07T21:57:25.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-07-20T09:16:34.000Z (over 9 years ago)
- Last Synced: 2024-10-31T17:48:39.592Z (about 2 months ago)
- Language: JavaScript
- Size: 148 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# karma-jasmine-shallow-equal
[![Build Status](https://travis-ci.org/gghez/karma-jasmine-shallow-equal.svg?branch=master)](https://travis-ci.org/gghez/karma-jasmine-shallow-equal)
[![NPM version](https://badge.fury.io/js/karma-jasmine-shallow-equal.png)](http://badge.fury.io/js/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:
```js
...
"devDependencies": {
"karma-jasmine-shallow-equal": "~x.x.x"
}
...
```Reference in *karma.conf.js*:
```js
...
frameworks: ['jasmine', 'jasmine-shallow-equal']
...
```## Example
```js
expect({
name: 'Michel',
language: 'javascript',
tags: ['developer', 'gamer']
}).toShallowEqual({
name: 'Michel',
tags: ['developer']
});
```More example here: [Unit Tests](test/matcherSpec.js)