monkey.js
is a monk.js
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
Currently, the following functionality works:
- database is saved in a
testDB.json
, no matter which url you givemonkey.js
- all functions are currently only synchronous. Simulating async use is planned soon
- Implemented so far:
-
var monk = require('monk');
🍌var monkey = require('monkey-js')
-
var db = monk(url);
🍌var db = monkey(url);
-
monk.get
🍌monkey.get
-
monk.create
🍌monkey.create
-
monk.close
🍌monkey.close
-
monk.create
🍌monkey.create
-
db.index
-
db.insert
-
db.find
-
db.update
Supports
$addToSet
and$each
usages
-
Copyright (c) 2017 Neil Kalman <neilkalman@gmail.com>