UNPKG

mongojs

Version:

Easy to use module that implements the mongo api

15 lines (13 loc) 291 B
var insert = require('./insert') insert('findOne', [{ hello: 'world1' }, { hello: 'world2' }], function (db, t, done) { db.a.findOne(function (err, doc) { t.error(err) t.equal(typeof doc, 'object') t.ok(doc.hello === 'world1' || doc.hello === 'world2') done() }) })