]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Failing tests for #470
authorTim Wood <washwithcare@gmail.com>
Mon, 22 Oct 2012 23:44:43 +0000 (16:44 -0700)
committerTim Wood <washwithcare@gmail.com>
Mon, 22 Oct 2012 23:44:43 +0000 (16:44 -0700)
test/moment/create.js
test/moment/is_valid.js

index 4f1018208064626c873125b8f753e388f18ef7b6..099ef018b53a4dc87f06360b190541c92a31ffd4 100644 (file)
@@ -153,7 +153,8 @@ exports.create = {
         var a = [
                 ['MMDDYYYY',          '12021999'],
                 ['DDMMYYYY',          '12021999'],
-                ['YYYYMMDD',          '19991202']
+                ['YYYYMMDD',          '19991202'],
+                ['DDMMMYYYY',         '10Sep2001']
             ],i;
 
         test.expect(a.length);
index fe2278c3bd2fad1058322e074c1e7397a3874597..a0e2b6028f6896e8500c7f47c468ad6da2bf8d6c 100644 (file)
@@ -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 = [