From: Tim Wood Date: Mon, 11 Feb 2013 20:13:10 +0000 (-0800) Subject: failing test for #615 X-Git-Tag: 2.1.0~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4934960a121d3acc81e526643b1faf9c218422e4;p=thirdparty%2Fmoment.git failing test for #615 --- diff --git a/test/moment/create.js b/test/moment/create.js index 559daa98b..09805238f 100644 --- a/test/moment/create.js +++ b/test/moment/create.js @@ -22,6 +22,14 @@ exports.create = { test.done(); }, + "multi format array copying": function(test) { + var importantArray = ['MM/DD/YYYY', 'YYYY-MM-DD', 'MM-DD-YYYY']; + test.expect(1); + moment('1999-02-13', importantArray); + test.deepEqual(importantArray, ['MM/DD/YYYY', 'YYYY-MM-DD', 'MM-DD-YYYY'], "initializer should not mutate the original array"); + test.done(); + }, + "number" : function(test) { test.expect(3); test.ok(moment(1000).toDate() instanceof Date, "1000");