Blame view

node_modules/mongojs/test/test-find-one.js 291 Bytes
46de8790   Tarpit Grover   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var insert = require('./insert');

insert('findOne', [{
  hello:'world1'
},{
  hello:'world2'
}], function(db, t, done) {
  db.a.findOne(function(err, doc) {
    t.ok(!err);
    t.equal(typeof doc, 'object');
    t.ok(doc.hello === 'world1' || doc.hello === 'world2');
    done();
  });
});