0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 01:21:03 +01:00
mongodb/jstests/date1.js
Dwight 17042c403e use $snapshot in the clone / repl code where appropriate
also adds snapshot to the C++ client driver
2009-08-10 16:57:59 -04:00

15 lines
245 B
JavaScript

t = db.date1;
function go( d , msg ){
t.drop();
t.save( { a : 1 , d : d } );
assert.eq( d , t.findOne().d , msg )
}
go( new Date() , "A" )
go( new Date( 1 ) , "B")
go( new Date( 0 ) , "C (old spidermonkey lib fails this test)")