Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/onebeyond/systemic-mongodb-memory-server
A systemic mongodb-memory-server component for testing without docker or dedicated mongodb servers.
https://github.com/onebeyond/systemic-mongodb-memory-server
hacktoberfest
Last synced: about 2 months ago
JSON representation
A systemic mongodb-memory-server component for testing without docker or dedicated mongodb servers.
- Host: GitHub
- URL: https://github.com/onebeyond/systemic-mongodb-memory-server
- Owner: onebeyond
- License: mit
- Created: 2020-02-20T15:21:03.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-06-24T11:02:00.000Z (about 1 year ago)
- Last Synced: 2024-07-30T09:15:18.678Z (about 2 months ago)
- Topics: hacktoberfest
- Language: JavaScript
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 15
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# systemic-mongodb-memory-server
A [systemic](https://github.com/guidesmiths/systemic) [mongodb-memory-server](https://github.com/nodkz/mongodb-memory-server) component for testing without docker or dedicated mongodb servers.
This component create a temporal server for testing and server is destroyed when tests are finished.
Check configuration options for `mongodbMemoryServer` at official [mongodb-memory-server documentation](https://github.com/nodkz/mongodb-memory-server).
## Usage
```js
const System = require('systemic');
const mongodb = require('mongodb-memory-server');
const config = {
mongodbMemoryServer: {
instance: {
db_name: 'test-db',
},
},
};new System()
.add('config', config, { scoped: true })
.add('mongodb', mongodb())
.dependsOn('config')
.start((err, components) => {
// Do your tests
});
```