Eduardo Sorribas
11 years ago
2 changed files with 25 additions and 0 deletions
@ -0,0 +1,18 @@ |
|||
var assert = require('assert'); |
|||
var insert = require('./insert'); |
|||
|
|||
insert([{ |
|||
hello:'world1' |
|||
},{ |
|||
hello:'world2' |
|||
}], function(db, done) { |
|||
var cursor = db.a.find(); |
|||
cursor.map(function(x) { |
|||
return x.hello |
|||
}, function(err, res) { |
|||
assert.equal(res[0], 'world1'); |
|||
assert.equal(res[1], 'world2'); |
|||
done(); |
|||
}); |
|||
}); |
|||
|
Loading…
Reference in new issue