46de8790
Tarpit Grover
first commit
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
var insert = require('./insert');
var concat = require('concat-stream');
insert('aggregate', [{
name:'Squirtle', type:'water'
}, {
name:'Starmie' , type:'water'
}, {
name:'Charmander' , type:'fire'
}, {
name:'Lapras' , type:'water'
}], function(db, t, done) {
db.a.find().sort({name: 1}, function(err, docs) {
t.ok(!err);
t.equal(docs[0].name, 'Charmander');
t.equal(docs[1].name, 'Lapras');
t.equal(docs[2].name, 'Squirtle');
t.equal(docs[3].name, 'Starmie');
t.end();
});
});
|