summaryrefslogtreecommitdiff
path: root/jstests/json1.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/json1.js')
-rw-r--r--jstests/json1.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/jstests/json1.js b/jstests/json1.js
index e045df732bc..8fa03eb7b85 100644
--- a/jstests/json1.js
+++ b/jstests/json1.js
@@ -18,3 +18,7 @@ assert.eq(tojson(x), '{\n\t"x" : [\n\t\t{\n\t\t\t"x" : [\n\t\t\t\t1,\n\t\t\t\t2,
// special types
x = {"x" : ObjectId("4ad35a73d2e34eb4fc43579a"), 'z' : /xd?/ig};
assert.eq(tojson(x,"",false), '{\n\t"x" : ObjectId("4ad35a73d2e34eb4fc43579a"),\n\t"z" : /xd?/gi\n}' , "F" );
+
+// Timestamp type
+x = {"x" : Timestamp()};
+assert.eq(tojson(x,"",false), '{\n\t"x" : Timestamp(0, 0)\n}' , "G")