From f0f5161a37d3dec663aa30cbbd86f22ec276dd21 Mon Sep 17 00:00:00 2001 From: Louis Chatriot Date: Thu, 2 May 2013 11:46:36 +0200 Subject: [PATCH] Able to query multiple documens --- test/db.test.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/db.test.js b/test/db.test.js index 6196a67..354f085 100644 --- a/test/db.test.js +++ b/test/db.test.js @@ -127,7 +127,7 @@ describe('Database', function () { }); }); } - , function (cb) { // Test with empty object + , function (cb) { // Test with query that will return docs d.find({ somedata: 'again' }, function (err, docs) { assert.isNull(err); docs.length.should.equal(2); @@ -135,6 +135,13 @@ describe('Database', function () { return cb(); }); } + , function (cb) { // Test with query that doesn't match anything + d.find({ somedata: 'nope' }, function (err, docs) { + assert.isNull(err); + docs.length.should.equal(0); + return cb(); + }); + } ], done); });