https://github.com/thatkookooguy/monkey-js
monkey.js is a monk.js mock library for testing. Saves data to a local file to check results against
https://github.com/thatkookooguy/monkey-js
mock mongodb testing
Last synced: about 1 month ago
JSON representation
monkey.js is a monk.js mock library for testing. Saves data to a local file to check results against
- Host: GitHub
- URL: https://github.com/thatkookooguy/monkey-js
- Owner: thatkookooguy
- License: mit
- Created: 2017-01-31T14:48:41.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-02T20:51:33.000Z (over 9 years ago)
- Last Synced: 2025-10-09T15:04:40.319Z (9 months ago)
- Topics: mock, mongodb, testing
- Language: JavaScript
- Size: 27.3 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# monkey.js 🐵 🍌 [](https://achievibit.herokuapp.com) [](https://github.com/ellerbrock/open-source-badge/)
`monkey.js` is a [`monk.js`](https://github.com/Automattic/monk) mock library for testing. Saves data to a local file to check results against.
This repo is still in early development. I'm writing this based on my needs.
If anyone have a request or want to report a bug, you can do so [here](https://github.com/Thatkookooguy/monkey-js/issues/new)
Currently, the following functionality works:
- database is saved in a `testDB.json`, no matter which url you give `monkey.js`
- all functions are currently only synchronous. Simulating async use is planned soon
- Implemented so far:
- `var monk = require('monk');` :banana: `var monkey = require('monkey-js')`
- `var db = monk(url);` :banana: `var db = monkey(url);`
- `monk.get` :banana: `monkey.get`
- `monk.create` :banana: `monkey.create`
- `monk.close` :banana: `monkey.close`
- `monk.create` :banana: `monkey.create`
- `db.index`
- `db.insert`
- `db.find`
- `db.update`
> Supports `$addToSet` and `$each` usages
## License
[MIT License](LICENSE)
Copyright (c) 2017 Neil Kalman <neilkalman@gmail.com>