]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
failing tests for #593
authorTim Wood <washwithcare@gmail.com>
Wed, 23 Jan 2013 18:18:24 +0000 (10:18 -0800)
committerTim Wood <washwithcare@gmail.com>
Wed, 23 Jan 2013 18:18:24 +0000 (10:18 -0800)
test/moment/create.js

index 641d5dc3f68f33e72bc5b6e0dcd5dbd038eccb35..c5419dea6179879fc37c2e6fffdddaf2f8510663 100644 (file)
@@ -56,6 +56,13 @@ exports.create = {
         test.done();
     },
 
+    "cloning moment should only copy own properties" : function(test) {
+        test.expect(2);
+        test.ok(!moment().clone().hasOwnProperty('month'), "Should not clone prototype methods");
+        test.ok(!moment().clone().hasOwnProperty('_lang'), "Should not clone prototype objects");
+        test.done();
+    },
+
     "undefined" : function(test) {
         test.expect(1);
         test.ok(moment().toDate() instanceof Date, "undefined");