Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix tests for default assert module

  • Loading branch information...
commit baa0702d395bf316a04bb453ac9d4df433ee08cc 1 parent 5726cd1
Dmitry Grytsovets authored
Showing with 9 additions and 0 deletions.
  1. +6 −0 test/test_bson.js
  2. +3 −0  test/test_mongodb.js
6 test/test_bson.js
View
@@ -6,5 +6,11 @@ var o={
d:new Date(),r:/[a]/gi,f:function(a){return a+1;}};
var e=bson.encode(o);
var d=bson.decode(e);
+assert.deepEqual(o.r.toString(),d.r.toString());
+assert.deepEqual(o.f.toString(),d.f.toString());
+delete o['f'];
+delete d['f'];
+delete o['r'];
+delete d['r'];
assert.deepEqual(o,d);
//assert.eql(JSON.stringify(o1),JSON.stringify(bson.decode(bson.encode(o1))));
3  test/test_mongodb.js
View
@@ -29,6 +29,9 @@ saveAndLoad(o)(function(err,result) {
assert.deepEqual(result2,{retval:[],ok:1});
delete ret['_id'];
delete o['f'];
+ assert.deepEqual(ret.r.toString(),o.r.toString());
+ delete ret['r'];
+ delete o['r'];
assert.deepEqual(ret,o);
});
Please sign in to comment.
Something went wrong with that request. Please try again.