1.1.0 • Published 5 years ago
bp-mongo-sanity v1.1.0
bp-mongo-sanity-package
A sanity test for the services using mongo.
This package expose MongoSanityTest
class that test the connection to the DB by get a document from the DB.
Take a look at test/MongoSanityTest.js
for implementation examples.
MongoSanityTest
gets an object with this schema:
{
"url": "mongodb://the/url",
"collectionsName": ["firstCollectionName", "secondCollectionName"]
}
Installation
$ npm i --save bp-mongo-sanity-package
Contributing
Just fork this repo and open a pull request when your are ready.
Development capabilities:
Features:
- Testing framework (mocha + chai + mochawesome reporter)
- Linting (eslint)
- Documentation generation (jsdoc + loke-jsdoc-theme)
- Reports and code hosting (webserver)
Gulp tasks:
- default - Runs the default scripts. Currently doesn't run any scripts.
run by typing 'gulp'
- test - Runs the code testing script. Runs the tests inside the test folder.
run by typing 'gulp test'
- lint - Runs the code linting script. Lints the code inside the lib folder.
run by typing 'gulp lint'
- lint:fix - Runs the code linting fix script. Fixes linting errors within the lib folder.
run by typing 'gulp lint:fix'
- lint:fix-specific - Runs the code linting fix specific script. Fixes linting errors within a specific provided file.
run by typing 'gulp lint:fix-specific'
- generate:documentation - Runs the documentation generation script. Generated documentation based on jsdoc comments (in the lib folder) and additional documentation (int the docs folder).
run by typing 'gulp generate:documentation'
- serve - Runs the serve script. Serves all files within the package.
run by typing 'gulp serve'
- clean:reports - Runs the reports cleaning script. Cleans all reports within the package.
run by typing 'gulp clean:reports'
enjoy :)
1.1.0
5 years ago