From: Iskren Chernev Date: Mon, 14 Oct 2013 07:01:42 +0000 (-0700) Subject: Removed a failing iso-format parsing test X-Git-Tag: 2.4.0~16^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1183%2Fhead;p=thirdparty%2Fmoment.git Removed a failing iso-format parsing test One of the things that is broken on Android is "including a trailing UTC in the input should work", which is a test added a long time ago, that used the fact that ISO format matched beginning of string. So right now this test goes through Date, which is different on regular vs mobile browser. Also adding UTC at the end doesn't make it parse a UTC date, so its misleading to say the least. I think removing the test makes the most sense in this case. The behavior (of adding UTC at the end is not documented, so shouldn't break legitimate code). --- diff --git a/test/moment/create.js b/test/moment/create.js index 8688952d0..fc0da3dfd 100644 --- a/test/moment/create.js +++ b/test/moment/create.js @@ -487,7 +487,7 @@ exports.create = { }, "parsing iso with T" : function (test) { - test.expect(9); + test.expect(8); test.equal(moment('2011-10-08T18')._f, "YYYY-MM-DDTHH", "should include 'T' in the format"); test.equal(moment('2011-10-08T18:20')._f, "YYYY-MM-DDTHH:mm", "should include 'T' in the format"); @@ -499,8 +499,6 @@ exports.create = { test.equal(moment('2011-10-08 18:20:13')._f, "YYYY-MM-DD HH:mm:ss", "should not include 'T' in the format"); test.equal(moment('2011-10-08 18:20:13.321')._f, "YYYY-MM-DD HH:mm:ss.S", "should not include 'T' in the format"); - test.ok(moment("2013-04-23 15:23:47 UTC").isValid(), "including a trailing UTC in the input should work"); - test.done(); },