You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
326 B
18 lines
326 B
var insert = require('./insert')
|
|
|
|
insert('cursor.map', [{
|
|
hello: 'world1'
|
|
}, {
|
|
hello: 'world2'
|
|
}], function (db, t, done) {
|
|
var cursor = db.a.find()
|
|
cursor.map(function (x) {
|
|
return x.hello
|
|
}, function (err, res) {
|
|
t.error(err)
|
|
t.equal(res[0], 'world1')
|
|
t.equal(res[1], 'world2')
|
|
done()
|
|
})
|
|
})
|
|
|
|
|