Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zation/chai-like-mongoose
The mongoose plugin for chai-like
https://github.com/zation/chai-like-mongoose
Last synced: about 7 hours ago
JSON representation
The mongoose plugin for chai-like
- Host: GitHub
- URL: https://github.com/zation/chai-like-mongoose
- Owner: zation
- Created: 2015-06-04T02:42:58.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-09-14T07:02:07.000Z (about 6 years ago)
- Last Synced: 2024-04-26T10:03:37.882Z (7 months ago)
- Language: JavaScript
- Size: 133 KB
- Stars: 1
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# chai-like-mongo
The mongoose plugin for chai-like used to compare object id.## Install
Install with [npm](https://www.npmjs.com/package/chai-like-mongoose)
```bash
npm install --save-dev chai-like-mongoose
```## Usage
```js
var chai = require('chai');
var like = require('chai-like');like.extend(require('chai-like-mongoose'));
chai.use(like);
```## Assertions
Compare two object id.
```js
var mongoose = require('mongoose');
var objectId = mongoose.Types.ObjectId('123456789012345678901234');objectId.should.like('123456789012345678901234');
objectId.should.not.like('123456789012345678901235');
```