]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Removed a failing iso-format parsing test 1183/head
authorIskren Chernev <iskren.chernev@gmail.com>
Mon, 14 Oct 2013 07:01:42 +0000 (00:01 -0700)
committerIskren Chernev <iskren.chernev@gmail.com>
Mon, 14 Oct 2013 07:01:42 +0000 (00:01 -0700)
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).

test/moment/create.js

index 8688952d0519eb3f95b6b93d7cbb6bf0eedbcac8..fc0da3dfdc714024df6180fd51fff13a6efa9ea6 100644 (file)
@@ -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();
     },