From 197d74aa44828ae45f1bc28251748cf82abb577f Mon Sep 17 00:00:00 2001 From: Michael McDermott Date: Wed, 13 Jan 2016 18:27:05 -0500 Subject: [PATCH] Updating monk to version ^1.0.1 and adding to list of methods to wrap. --- index.js | 3 ++- package.json | 19 ++++++++++++++----- test/index.js | 6 ++++-- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/index.js b/index.js index 1738cc8..f8851b7 100644 --- a/index.js +++ b/index.js @@ -14,6 +14,7 @@ var methods = [ 'update', 'updateById', 'remove', + 'removeById', 'count', 'find', 'findOne', @@ -36,4 +37,4 @@ module.exports = function(col){ }); return col; -}; \ No newline at end of file +}; diff --git a/package.json b/package.json index a5bac67..a8771f0 100644 --- a/package.json +++ b/package.json @@ -3,16 +3,25 @@ "version": "1.0.0", "repository": "visionmedia/co-monk", "description": "mongodb generator goodness for co", - "keywords": ["co", "monk", "generators", "mongo", "mongodb"], + "keywords": [ + "co", + "monk", + "generators", + "mongo", + "mongodb" + ], "dependencies": { "thunkify": "0.0.1" }, "devDependencies": { - "mocha": "*", - "should": "*", "co": "~2.3.0", - "monk": "~0.7.1" + "mocha": "*", + "mongodb": "^1.4.40", + "monk": "^1.0.1", + "should": "*" }, - "files": ["index.js"], + "files": [ + "index.js" + ], "license": "MIT" } diff --git a/test/index.js b/test/index.js index 5f6bd9a..43baf9d 100644 --- a/test/index.js +++ b/test/index.js @@ -24,9 +24,11 @@ describe('queries', function(){ var res = yield users.findOne({ name: 'Tobi' }); res.name.should.equal('Tobi'); + yield users.removeById(res._id); + var res = yield users.find({ species: 'ferret' }); - res.should.have.length(3); + res.should.have.length(2); })(done); }) -}) \ No newline at end of file +})