https://github.com/b1f6c1c4/jest-mongoose

Mongoose integration test made easy and terse.

https://github.com/b1f6c1c4/jest-mongoose

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

integration-testing javascript jest jest-mongoose mongodb mongoose testing unit-testing

Keywords from Contributors

projection generic sequences interactive charting archival standardization optim controllers embedded
Last synced: 5 months ago · JSON representation

Repository

Mongoose integration test made easy and terse.

Basic Info
  • Host: GitHub
  • Owner: b1f6c1c4
  • License: mit
  • Language: JavaScript
  • Default Branch: master
  • Homepage:
  • Size: 705 KB
Statistics
  • Stars: 5
  • Watchers: 1
  • Forks: 0
  • Open Issues: 1
  • Releases: 1
Topics
integration-testing javascript jest jest-mongoose mongodb mongoose testing unit-testing
Created almost 8 years ago · Last pushed over 2 years ago
Metadata Files
Readme License

README.md

jest-mongoose

Appveyor Build

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 example folder.

```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

52BE D143 A92D BE96 2B83 092B 9BAC 0164 9600 1E70

GitHub Events

Total
Last Year

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 100
  • Total Committers: 3
  • Avg Commits per committer: 33.333
  • Development Distribution Score (DDS): 0.33
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email 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
greenkeeper (3)
Pull Request Labels
dependencies (87) greenkeeper (3)

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.

  • Versions: 5
  • Dependent Packages: 4
  • Dependent Repositories: 6
  • Downloads: 22 Last month
Rankings
Dependent packages count: 4.5%
Dependent repos count: 4.6%
Average: 10.5%
Stargazers count: 11.5%
Forks count: 15.4%
Downloads: 16.5%
Maintainers (1)
Last synced: 6 months ago

Dependencies

example/package-lock.json npm
  • 301 dependencies
example/package.json npm
  • jest-cli ^28.1.3 development
  • mongoose ^6.5.0
package-lock.json npm
  • 302 dependencies
package.json npm
  • jest-cli ^28.1.3 development
  • debug ^4.3.4
  • lodash ^4.17.21