https://github.com/b1f6c1c4/jest-mongoose
Mongoose integration test made easy and terse.
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.0%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Mongoose integration test made easy and terse.
Basic Info
Statistics
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 1
- Releases: 1
Topics
Metadata Files
README.md
jest-mongoose
Mongoose integration test made easy and terse.
This package helps you do mongoose integration test at ease.
- Easy to use. Terse and intuitive API.
- MongoDB connection is managed by yourself.
- No giant binary dependencies like
mongodb-download.
Pre-requisites
This module requires Jest and Mongoose.
Installation
sh
$ npm i --save-dev jest-mongoose
Usage
For a complete working demo, see the
examplefolder.
```js const { models, make, mer, check } = require('./bundle'); const { createUser } = require('../userManagement');
describe('createUser', () => { it('should make a new user', async () => { // Call the function to be tested await createUser(); // Check if the result is correct await check.User({ _id: 'the-id', name: 'the-name', }); });
it('should handle duplication insertion', async () => { // Setup database records is simple await make.User({ _id: 'the-id', name: 'my-name-is-evil', }); const result = await createUser(); // Check the return value expect(result).toBeInstanceOf(Error); // Check the previous record is intact await check.User({ _id: 'the-id', name: 'my-name-is-evil', }); }); }); ```
License
MIT
Owner
- Login: b1f6c1c4
- Kind: user
- Location: NJ, USA
- Company: Princeton University
- Repositories: 26
- Profile: https://github.com/b1f6c1c4
52BE D143 A92D BE96 2B83 092B 9BAC 0164 9600 1E70
GitHub Events
Total
Last Year
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| dependabot[bot] | 4****] | 67 |
| b1f6c1c4 | b****4@g****m | 32 |
| greenkeeper[bot] | g****] | 1 |
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 3
- Total pull requests: 91
- Average time to close issues: 8 months
- Average time to close pull requests: 23 days
- Total issue authors: 1
- Total pull request authors: 2
- Average comments per issue: 0.0
- Average comments per pull request: 0.26
- Merged pull requests: 68
- Bot issues: 3
- Bot pull requests: 91
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- greenkeeper[bot] (3)
Pull Request Authors
- dependabot[bot] (87)
- greenkeeper[bot] (3)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- npm 22 last-month
- Total dependent packages: 4
- Total dependent repositories: 6
- Total versions: 5
- Total maintainers: 1
npmjs.org: jest-mongoose
Mongoose integration test made easy and terse.
- Homepage: https://github.com/b1f6c1c4/jest-mongoose#readme
- License: MIT
-
Latest release: 2.0.0
published over 3 years ago
Rankings
Maintainers (1)
Dependencies
- 301 dependencies
- jest-cli ^28.1.3 development
- mongoose ^6.5.0
- 302 dependencies
- jest-cli ^28.1.3 development
- debug ^4.3.4
- lodash ^4.17.21