mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
24 lines
432 B
JavaScript
Executable File
24 lines
432 B
JavaScript
Executable File
var test = require('./tape');
|
|
var insert = require('./insert');
|
|
|
|
insert('distinct', [{
|
|
goodbye:'world',
|
|
hello:'space'
|
|
}, {
|
|
goodbye:'world',
|
|
hello:'space'
|
|
}, {
|
|
goodbye:'earth',
|
|
hello:'space'
|
|
}, {
|
|
goodbye:'world',
|
|
hello:'space'
|
|
}], function(db, t, done) {
|
|
db.a.distinct('goodbye',{hello:'space'},function(err, docs) {
|
|
t.ok(!err);
|
|
t.equal(docs.length, 2);
|
|
t.equal(docs[0], 'world');
|
|
done();
|
|
});
|
|
});
|