From: Tim Wood Date: Mon, 22 Oct 2012 23:44:43 +0000 (-0700) Subject: Failing tests for #470 X-Git-Tag: 2.0.0~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ba3d988f798f35bc46f3ce2056c4457d49d2ac1;p=thirdparty%2Fmoment.git Failing tests for #470 --- diff --git a/test/moment/create.js b/test/moment/create.js index 4f1018208..099ef018b 100644 --- a/test/moment/create.js +++ b/test/moment/create.js @@ -153,7 +153,8 @@ exports.create = { var a = [ ['MMDDYYYY', '12021999'], ['DDMMYYYY', '12021999'], - ['YYYYMMDD', '19991202'] + ['YYYYMMDD', '19991202'], + ['DDMMMYYYY', '10Sep2001'] ],i; test.expect(a.length); diff --git a/test/moment/is_valid.js b/test/moment/is_valid.js index fe2278c3b..a0e2b6028 100644 --- a/test/moment/is_valid.js +++ b/test/moment/is_valid.js @@ -92,6 +92,14 @@ exports.is_valid = { test.done(); }, + "string with spaceless format" : function (test) { + test.expect(1); + + test.equal(moment('10Sep2001', 'DDMMMYYYY').isValid(), true, "Parsing 10Sep2001 should result in a valid date"); + + test.done(); + }, + "invalid string iso 8601" : function (test) { var tests = [