mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
14 lines
231 B
JavaScript
14 lines
231 B
JavaScript
|
|
t = db.distinct2;
|
|
t.drop();
|
|
|
|
t.save({a:null});
|
|
assert.eq( 0 , t.distinct('a.b').length , "A" );
|
|
|
|
t.drop();
|
|
t.save( { a : 1 } );
|
|
assert.eq( [1] , t.distinct( "a" ) , "B" );
|
|
t.save( {} )
|
|
assert.eq( [1] , t.distinct( "a" ) , "C" );
|
|
|