]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Make sure no Date constructor is used in tests 1577/head
authorIskren Chernev <iskren.chernev@gmail.com>
Tue, 1 Apr 2014 04:13:30 +0000 (21:13 -0700)
committerIskren Chernev <iskren.chernev@gmail.com>
Wed, 2 Apr 2014 07:05:29 +0000 (00:05 -0700)
100 files changed:
moment.js
test/lang/ar-ma.js
test/lang/ar.js
test/lang/bg.js
test/lang/br.js
test/lang/bs.js
test/lang/ca.js
test/lang/cs.js
test/lang/cv.js
test/lang/cy.js
test/lang/da.js
test/lang/de.js
test/lang/el.js
test/lang/en-au.js
test/lang/en-ca.js
test/lang/en-gb.js
test/lang/en.js
test/lang/eo.js
test/lang/es.js
test/lang/et.js
test/lang/eu.js
test/lang/fa.js
test/lang/fi.js
test/lang/fo.js
test/lang/fr-ca.js
test/lang/fr.js
test/lang/gl.js
test/lang/he.js
test/lang/hi.js
test/lang/hr.js
test/lang/hu.js
test/lang/hy-am.js
test/lang/id.js
test/lang/is.js
test/lang/it.js
test/lang/ja.js
test/lang/ka.js
test/lang/ko.js
test/lang/lb.js
test/lang/lt.js
test/lang/lv.js
test/lang/mk.js
test/lang/ml.js
test/lang/mr.js
test/lang/ms-my.js
test/lang/nb.js
test/lang/ne.js
test/lang/nl.js
test/lang/nn.js
test/lang/pl.js
test/lang/pt-br.js
test/lang/pt.js
test/lang/ro.js
test/lang/ru.js
test/lang/sk.js
test/lang/sl.js
test/lang/sq.js
test/lang/sr-cyr.js
test/lang/sr.js
test/lang/sv.js
test/lang/ta.js
test/lang/th.js
test/lang/tl-ph.js
test/lang/tr.js
test/lang/tzm-la.js
test/lang/tzm.js
test/lang/uk.js
test/lang/uz.js
test/lang/vi.js
test/lang/zh-cn.js
test/lang/zh-tw.js
test/moment/add_subtract.js
test/moment/create.js
test/moment/days_in_month.js
test/moment/diff.js
test/moment/duration.js
test/moment/format.js
test/moment/getters_setters.js
test/moment/invalid.js
test/moment/is_after.js
test/moment/is_before.js
test/moment/is_moment.js
test/moment/is_same.js
test/moment/is_valid.js
test/moment/lang.js
test/moment/leapyear.js
test/moment/listers.js
test/moment/min_max.js
test/moment/mutable.js
test/moment/normalizeUnits.js
test/moment/parsing_flags.js
test/moment/preparse_postformat.js
test/moment/quarter.js
test/moment/sod_eod.js
test/moment/string_prototype.js
test/moment/utc.js
test/moment/week_year.js
test/moment/weekday.js
test/moment/weeks.js
test/moment/zones.js

index b059e0a8230210dbeb68efebb8acdcc6a30ea5c9..991d2bace860fbc6ebcd5f7797b247b2f33a2459 100644 (file)
--- a/moment.js
+++ b/moment.js
             config._d = new Date(+input);
         } else if (typeof(input) === 'object') {
             dateFromObject(config);
-        } else {
+        } else if (typeof(input) === 'number') {
+            // from milliseconds
             config._d = new Date(input);
+        } else {
+            moment.createFromInputFallback(config);
         }
     }
 
         return makeMoment(c);
     };
 
+    moment.createFromInputFallback = function (config) {
+        config._d = new Date(config._i);
+    };
+
     // creating with utc
     moment.utc = function (input, format, lang, strict) {
         var c;
index edded5dadde2ea539f0712893df265a74040bcac..5536a303b35a7409fc66c6a479cb167b8c5e58ee 100644 (file)
@@ -5,6 +5,9 @@ var moment = require("../../moment");
 exports["lang:ar-ma"] = {
     setUp : function (cb) {
         moment.lang('ar-ma');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
index 098b802e2d135b4e4c28af62ddacd5c5f8eec8b3..f0f81f3434ff03196773c283d3ba41dbd1e16534 100644 (file)
@@ -5,6 +5,9 @@ var moment = require("../../moment");
 exports["lang:ar"] = {
     setUp : function (cb) {
         moment.lang('ar');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
index f28e693d35036b5d1f1d9ab5eed4a82d536da79e..33d35f929a81bdd09f977f4b36b4fc5860dc1de4 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:bg"] = {
     setUp : function (cb) {
         moment.lang('bg');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
index 7e007a7e33ed67c551a21ec57a1b2e16788d8d9c..f1350d3865724d0f4d6e49dfe946e9b44524c844 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:br"] = {
     setUp : function (cb) {
         moment.lang('br');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -268,12 +271,12 @@ exports["lang:br"] = {
         test.equal(start.from(moment([2007, 1, 28]).add({y: 261}), true), "261 bloaz", "mutation 261 years");
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/br'), 'br', "module should export br");
         }
-        
+
         test.done();
     }
 };
index 10930e191b93cd747bee0cc66f1ee7ecfc04cf3c..4f1834b6c116714996e3cc78614965d9697da653 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:bs"] = {
     setUp : function (cb) {
         moment.lang('bs');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
index fbf68fe7abe84d39ff63b9aeb595a4f3d5f3232f..d17f38dd76927ca533741ab2fba37b67a67705f6 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:ca"] = {
     setUp : function (cb) {
         moment.lang('ca');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -315,12 +318,12 @@ exports["lang:ca"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/ca'), 'ca', "module should export ca");
         }
-        
+
         test.done();
     }
 };
index ada0edf02f7723363b840b7d25777bd361e7839d..06d853e8997563161a47bd09e385188555c7fa2c 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:cs"] = {
     setUp : function (cb) {
         moment.lang('cs');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
index 27d81a9d2ae6a6b41ef333a0486989db8fabc0be..7dfff781dfbf53bb1dc1ed960c3bb25a2a24a0cd 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:cv"] = {
     setUp : function (cb) {
         moment.lang('cv');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -354,12 +357,12 @@ exports["lang:cv"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/cv'), 'cv', "module should export cv");
         }
-        
+
         test.done();
     }
 };
index 362b89be013a0c27a544d0ee0685f3d472f4543a..dec695e7a49d0292e074d2b42dee6cc748db49ab 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:cy"] = {
     setUp : function (cb) {
         moment.lang('cy');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -351,12 +354,12 @@ exports["lang:cy"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/cy'), 'cy', "module should export cy");
         }
-        
+
         test.done();
     }
 };
index 5c5ba26e13f9c62ccea722026f92d8a83001efed..685c85e24635ddf250bd664e07186b64f4ea817a 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:da"] = {
     setUp : function (cb) {
         moment.lang('da');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -286,12 +289,12 @@ exports["lang:da"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/da'), 'da', "module should export da");
         }
-        
+
         test.done();
     }
 };
index f97c08d41f3e90f05a6a2c65b72fd7be296dd8a9..1a4cc43977c30f98c65ab4736e0faa8bc2740531 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:de"] = {
     setUp : function (cb) {
         moment.lang('de');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -347,12 +350,12 @@ exports["lang:de"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/de'), 'de', "module should export de");
         }
-        
+
         test.done();
     }
 };
index 59bafd3a25143585fa17ae46a00bf3f75519b926..88c94428f6f51df17ebd2e2ea048ced2780297cb 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:el"] = {
     setUp : function (cb) {
         moment.lang('el');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -378,12 +381,12 @@ exports["lang:el"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/el'), 'el', "module should export el");
         }
-        
+
         test.done();
     }
 };
index 0a7a824e31f6bcdda4c8a3b48dfa037aeb93e2f6..954f72b9aea4cb4006e10888f047dfc784909af2 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:en-au"] = {
     setUp : function (cb) {
         moment.lang('en-au');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
index 1703511b5e5f6f47c005ef236e36ec48e8d5a577..623eb0916d2e82145bd590d1092d1ca92ffea756 100644 (file)
@@ -7,6 +7,9 @@ var moment = require("../../moment");
 exports["lang:en-ca"] = {
     setUp : function (cb) {
         moment.lang('en-ca');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -375,12 +378,12 @@ exports["lang:en-ca"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/en-ca'), 'en-ca', "module should export en-ca");
         }
-        
+
         test.done();
     }
 };
index 5ebe4519eddd32a4d8a57f3235627a50739562c0..e283e3aee6e17e55bbdf196f01704affe14fbdc2 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:en-gb"] = {
     setUp : function (cb) {
         moment.lang('en-gb');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
index 7a0e8b05a410083a2d4c29154ad0a9c6c94904be..85c4f8c820b87ece4d9eba9358ff67c7971da212 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:en"] = {
     setUp : function (cb) {
         moment.lang('en');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
index 57455fe91ce1dc986ea388244d8b5c4dfb1ea7ab..828f974137a78ae544777f3a376cc7eb901b3e7c 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:eo"] = {
     setUp : function (cb) {
         moment.lang('eo');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -356,12 +359,12 @@ exports["lang:eo"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/eo'), 'eo', "module should export eo");
         }
-        
+
         test.done();
     }
 };
index ef588098161cef2f0d1da1e7f789129b2f9c61a7..d2d9ec712f39c1b1d04d85be0904991d2c38b6f5 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:es"] = {
     setUp : function (cb) {
         moment.lang('es');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
index b0d9cace30023fce43952e0104029cc5f71569f6..b2cc646e93680336e0a864807f5739db33d17302 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:et"] = {
     setUp : function (cb) {
         moment.lang('et');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -189,7 +192,7 @@ exports["lang:et"] = {
 
         test.equal(moment().add({s: 30}).fromNow(), "mõne sekundi pärast", "in a few seconds");
         test.equal(moment().subtract({s: 30}).fromNow(), "mõni sekund tagasi", "a few seconds ago");
-        
+
         test.equal(moment().add({m: 1}).fromNow(), "ühe minuti pärast", "in a minute");
         test.equal(moment().subtract({m: 1}).fromNow(), "üks minut tagasi", "a minute ago");
 
@@ -381,12 +384,12 @@ exports["lang:et"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/et'), 'et', "module should export et");
         }
-        
+
         test.done();
     }
 };
index 1c0f12b6f0959d87f6508a082b1404aab7c0f725..d47f66707d34b9ab31ee23cc9bfda23cc1fa4697 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:eu"] = {
     setUp : function (cb) {
         moment.lang('eu');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -353,12 +356,12 @@ exports["lang:eu"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/eu'), 'eu', "module should export eu");
         }
-        
+
         test.done();
     }
 };
index 75f0de97efd966fac335e392aa950c378d921a0f..0086e77d025a1469afe74d8cb0561578ed08a8f9 100644 (file)
@@ -5,6 +5,9 @@ var moment = require("../../moment");
 exports["lang:fa"] = {
     setUp : function (cb) {
         moment.lang('fa');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -335,12 +338,12 @@ exports["lang:fa"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/fa'), 'fa', "module should export fa");
         }
-        
+
         test.done();
     }
 };
index c85bfb871b628314b3c431e3ca0c898dddd6e16d..98febccec8a55b375079318ddd11f2fe5f6630ed 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:fi"] = {
     setUp : function (cb) {
         moment.lang('fi');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -348,12 +351,12 @@ exports["lang:fi"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/fi'), 'fi', "module should export fi");
         }
-        
+
         test.done();
     }
 };
index 98d173648b77d2667f8c32c765a404346de7a7ed..db53caa64dd65167f9e3b0f1c6234ea426f69a38 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:fo"] = {
     setUp : function (cb) {
         moment.lang('fo');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -286,12 +289,12 @@ exports["lang:fo"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/fo'), 'fo', "module should export fo");
         }
-        
+
         test.done();
     }
 };
index b9e43559cdee3ec531b09e1f725283d512cfe018..dd3545edfb87fdf0e759d3633c52aa6814497ff2 100644 (file)
@@ -7,6 +7,9 @@ var moment = require("../../moment");
 exports["lang:fr-ca"] = {
     setUp : function (cb) {
         moment.lang('fr-ca');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -368,12 +371,12 @@ exports["lang:fr-ca"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/fr-ca'), 'fr-ca', "module should export fr-ca");
         }
-        
+
         test.done();
     }
 };
index 5de9a7b49ac3d0b43d2b49e5811ca81207c84f23..80b7dea242cd3d1f2f9b53702d2564e42c3890fd 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:fr"] = {
     setUp : function (cb) {
         moment.lang('fr');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -351,12 +354,12 @@ exports["lang:fr"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/fr'), 'fr', "module should export fr");
         }
-        
+
         test.done();
     }
 };
index 2a78bb969da7401d214a0ebfefaead7528183f36..54c20616ebf467527c3ffbd642d00d81cd1507af 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:gl"] = {
     setUp : function (cb) {
         moment.lang('gl');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -332,12 +335,12 @@ exports["lang:gl"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/gl'), 'gl', "module should export gl");
         }
-        
+
         test.done();
     }
 };
index 146d912c42fca9f4221b19834ff6e5a0b9622cff..6c04f08e52133673e1932264db9889486523265b 100644 (file)
@@ -8,6 +8,9 @@
 exports["lang:he"] = {
     setUp : function (cb) {
         moment.lang('he');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -311,12 +314,12 @@ exports["lang:he"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/he'), 'he', "module should export he");
         }
-        
+
         test.done();
     }
 };
index e6ff6857657965ec3936b51e74988dbf1a25ee8e..90c179779dbcf19da25e7c0ae7169dc1e5094516 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:hi"] = {
     setUp : function (cb) {
         moment.lang('hi');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -374,12 +377,12 @@ exports["lang:hi"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/hi'), 'hi', "module should export hi");
         }
-        
+
         test.done();
     }
 };
index 7316f7eaf4275754da5b316d633fb11f14fbf4f2..0f0ea3e58d018ac1976772c66756878b5b099f30 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:hr"] = {
     setUp : function (cb) {
         moment.lang('hr');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -382,12 +385,12 @@ exports["lang:hr"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/hr'), 'hr', "module should export hr");
         }
-        
+
         test.done();
     }
 };
index 192966b29188b582295c16c46b1521553bf0e520..f807fa914363f7ac19ac034d266c82266eaaa718 100644 (file)
@@ -7,6 +7,9 @@ var moment = require("../../moment");
 exports["lang:hu"] = {
     setUp : function (cb) {
         moment.lang('hu');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -353,12 +356,12 @@ exports["lang:hu"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/hu'), 'hu', "module should export hu");
         }
-        
+
         test.done();
     }
 };
index dad53650e9f35dd0b29ac2243ca660a00e85a11c..3871bcfe83de31009d1b25b9dd2cd8e25aea592d 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:hy-am"] = {
     setUp : function (cb) {
         moment.lang('hy-am');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -438,13 +441,13 @@ exports["lang:hy-am"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/hy-am'), 'hy-am', "module should export hy");
         }
-        
+
         test.done();
     }
-    
+
 };
index 93ca9906fe2467b99fec6f0696a91dd428008d87..4ed3d9b9c0c56ebd466c2be6280a998184e61849 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:id"] = {
     setUp : function (cb) {
         moment.lang('id');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -308,12 +311,12 @@ exports["lang:id"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/id'), 'id', "module should export id");
         }
-        
+
         test.done();
     }
 };
index b727b434940026c07d7cae6682c26791119de458..57adf39dbdf89ec96685b97b37a675a4c048c7d7 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:is"] = {
     setUp : function (cb) {
         moment.lang('is');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -361,13 +364,13 @@ exports["lang:is"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
-        
+
             test.equal(require('../../lang/is'), 'is', "module should export is");
         }
-        
+
         test.done();
     }
 };
index 321a5805edd55c368f113796d9ee3cc5d90d9cab..3e326ab88a76d2eae5a8f946036cc8ad7bc170d2 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:it"] = {
     setUp : function (cb) {
         moment.lang('it');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -349,12 +352,12 @@ exports["lang:it"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/it'), 'it', "module should export it");
         }
-        
+
         test.done();
     }
 };
index 127f1ce94df14faa74aa916d503c4dd24ca32c04..849d63aacd20c60bd95bed937f950225e47e5f02 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:ja"] = {
     setUp : function (cb) {
         moment.lang('ja');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -313,12 +316,12 @@ exports["lang:ja"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/ja'), 'ja', "module should export ja");
         }
-        
+
         test.done();
     }
 };
index ed0c7ade6ff749ef2a90ee21ede12dc4412cd6b7..d383004ae3d9769cb0f0068ee6572a7e15256e5a 100644 (file)
@@ -7,6 +7,9 @@ var moment = require("../../moment");
 exports["lang:ka"] = {
     setUp : function (cb) {
         moment.lang('ka');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
index 839061d453ba8292762cfb2f5161c5e20d046596..7bad59f694ae1e280e5f56b1d2acf81c557b92d2 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:kr"] = {
     setUp : function (cb) {
         moment.lang('ko');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
index dbac991c521deeeedbee9bc1d2f1a483f2a1b6cd..0e0f31d92a44ea3b764d5ecbc502c24d75ea9d19 100644 (file)
@@ -7,6 +7,9 @@ var moment = require("../../moment");
 exports["lang:lb"] = {
     setUp: function (cb) {
         moment.lang('lb');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
index 996693b90039e7550de44ca5895dc5b21718d2ad..5169391116231855b5d37d7831f7637cd42862b8 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:lt"] = {
     setUp : function (cb) {
         moment.lang('lt');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -359,12 +362,12 @@ exports["lang:lt"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/lt'), 'lt', "module should export lt");
         }
-        
+
         test.done();
     }
 };
index 66232b071c7dc05cce9a5f30447cab677b86ce1c..2f82c8fde850340880a6af5582d3dd45ed4cd276 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:lv"] = {
     setUp : function (cb) {
         moment.lang('lv');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -352,12 +355,12 @@ exports["lang:lv"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/lv'), 'lv', "module should export lv");
         }
-        
+
         test.done();
     }
 };
index debe32a7d47058d2624027912211043d5b698de7..9581756b754d9d5021042d0883fa95b6d9b81f98 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:mk"] = {
     "setUp" : function (cb) {
         moment.lang('mk');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
index efb2d1901f8270941dc3998c200f77f591bcc018..19223f221c7f990ce4ebf1f194582ceb08566139 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:ml"] = {
     setUp : function (cb) {
         moment.lang('ml');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -374,12 +377,12 @@ exports["lang:ml"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/ml'), 'ml', "module should export ml");
         }
-        
+
         test.done();
     }
 };
index 5be909d99be50b341a45552a84d1f762e15b6793..4fe90a20885a5f536ddf30aeaaf7f7cfd8fdb341 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:mr"] = {
     setUp : function (cb) {
         moment.lang('mr');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -374,12 +377,12 @@ exports["lang:mr"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/mr'), 'mr', "module should export mr");
         }
-        
+
         test.done();
     }
 };
index 4ac521aa42018ea0efa39900347d974c1e2b532c..1c673f30bb96d995db238425b6804c69b85413ed 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:ms-my"] = {
     setUp : function (cb) {
         moment.lang('ms-my');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -374,12 +377,12 @@ exports["lang:ms-my"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/ms-my'), 'ms-my', "module should export ms-my");
         }
-        
+
         test.done();
     }
 };
index 59763276d371eba240b2bd647e5dd40faf5ebe12..ff5b83e5687c63a64ad99fbaebda07b7be9f21ca 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:nb"] = {
     setUp : function (cb) {
         moment.lang('nb');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -353,12 +356,12 @@ exports["lang:nb"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/nb'), 'nb', "module should export nb");
         }
-        
+
         test.done();
     }
 };
index c1500ffa93a69cbcce7e274b7af7840ae03f6592..59dcc8ca70d2d96fcef04cb90bc0c788ca1f3bc8 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:ne"] = {
     setUp : function (cb) {
         moment.lang('ne');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -372,12 +375,12 @@ exports["lang:ne"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/ne'), 'ne', "module should export ne");
         }
-        
+
         test.done();
     }
 };
index 53c12dbfac6f6ddafeda5350c5e45901c5f880ef..f1e146d1710e9510181e764a603f02c69a8e370c 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:nl"] = {
     setUp : function (cb) {
         moment.lang('nl');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -363,12 +366,12 @@ exports["lang:nl"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/nl'), 'nl', "module should export nl");
         }
-        
+
         test.done();
     }
 };
index b16b4deb0f01dc27c11b90e4f0e72c58003b6a66..96a1745aa01d228e9d061826ecf04cc2212b0956 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:nn"] = {
     setUp : function (cb) {
         moment.lang('nn');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
index ea747a7209c5715099f4e4b8a343e19579724d2e..fe9caad1a3070a0ec340041fc87c8f68236bb3b7 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:pl"] = {
     setUp : function (cb) {
         moment.lang('pl');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -375,12 +378,12 @@ exports["lang:pl"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/pl'), 'pl', "module should export pl");
         }
-        
+
         test.done();
     }
 };
index a55b2610d85c75e17642cb380ba43d0decf55da9..c75d90606131c2710733477edc1a8917895e51a6 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:pt-br"] = {
     setUp : function (cb) {
         moment.lang('pt-br');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -354,12 +357,12 @@ exports["lang:pt-br"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/pt-br'), 'pt-br', "module should export pt-br");
         }
-        
+
         test.done();
     }
 };
index e56f175c3f49bd5a0d4eb12c0b31e9ec115b539d..5bf4f9da6896dd24f6d1c698f5f728c70083fe09 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:pt"] = {
     setUp : function (cb) {
         moment.lang('pt');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -344,12 +347,12 @@ exports["lang:pt"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/pt'), 'pt', "module should export pt");
         }
-        
+
         test.done();
     }
 };
index 684127555cb73cb29b2cca0e54c1cb3ca40017ee..d30adc15d4ff928f3d283414d0254bccac1b1daf 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:ro"] = {
     setUp : function (cb) {
         moment.lang('ro');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -361,12 +364,12 @@ exports["lang:ro"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/ro'), 'ro', "module should export ro");
         }
-        
+
         test.done();
     }
 };
index f1aecded665e10a5b4fa3ff9d911d40c54d09797..229ceedb8151adf23c2691dd0d4c522bde1606de 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:ru"] = {
     setUp : function (cb) {
         moment.lang('ru');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -449,12 +452,12 @@ exports["lang:ru"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/ru'), 'ru', "module should export ru");
         }
-        
+
         test.done();
     }
 };
index 3dfbbdfcb71b9c9038a10499e95022df69213890..69b4d86714bc54b9cfa2349aa99b792280a237fe 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:sk"] = {
     setUp : function (cb) {
         moment.lang('sk');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -438,12 +441,12 @@ exports["lang:sk"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/sk'), 'sk', "module should export sk");
         }
-        
+
         test.done();
     }
 };
index bb7b5d2cea3848e7cbb30689106de941bc9e153b..ec5670a5a02c24067b17c34c842101321571f83b 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:sl"] = {
     setUp : function (cb) {
         moment.lang('sl');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -381,12 +384,12 @@ exports["lang:sl"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/sl'), 'sl', "module should export sl");
         }
-        
+
         test.done();
     }
 };
index 63f0f5b7b0759cfbc3a66284248a2a082588127c..b07974231d2688782aa206112eba64ce4be380f8 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:sq"] = {
     setUp : function (cb) {
         moment.lang('sq');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
index 3a56dd37bed52c44f7d291f54192ee018a679350..95d0bbd4b5726310649a74b445a6bb71b6550b37 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:sr-cyr"] = {
     setUp : function (cb) {
         moment.lang('sr-cyr');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
index daa7571bf5bcdc74269cf273bcab394713e7921d..c0556b9559e9a350f78880f0b64608341f96da92 100644 (file)
@@ -7,7 +7,10 @@ var moment = require("../../moment");
 
 exports["lang:sr"] = {
     setUp : function (cb) {
-        moment.lang('sr-lat');
+        moment.lang('sr');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
index f4546151cbf82a77c4b55d0fbc18f77798560584..2a9047b9e6baac3b8a41b266f47f737188d7631c 100644 (file)
@@ -7,6 +7,9 @@ var moment = require("../../moment");
 exports["lang:sv"] = {
     setUp : function (cb) {
         moment.lang('sv');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -346,12 +349,12 @@ exports["lang:sv"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/sv'), 'sv', "module should export sv");
         }
-        
+
         test.done();
     }
 };
index 3141cea1e8a20805c41cab7bf9984028f23020a3..25ead5d4f1eb3b3e4e4e0f3fa6bd8fb662c1815d 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:ta"] = {
     setUp : function (cb) {
         moment.lang('ta');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -39,28 +42,28 @@ exports["lang:ta"] = {
     "format" : function (test) {
         test.expect(22);
         var a = [
-                ['dddd, MMMM Do YYYY, h:mm:ss a',              'ஞாயிற்றுக்கிழமை, பிப்ரவரி 14வது 2010, 3:25:50  எற்பாடு'],   
-                ['ddd, hA',                       'ஞாயிறு, 3 எற்பாடு'],                                        
-                ['M Mo MM MMMM MMM',              '2 2வது 02 பிப்ரவரி பிப்ரவரி'],                              
-                ['YYYY YY',                       '2010 10'],                                                  
-                ['D Do DD',                       '14 14வது 14'],                                              
-                ['d do dddd ddd dd',              '0 0வது ஞாயிற்றுக்கிழமை ஞாயிறு ஞா'],                         
-                ['DDD DDDo DDDD',                 '45 45வது 045'],                                             
-                ['w wo ww',                       '8 8வது 08'],                                                
-                ['h hh',                          '3 03'],                                                     
-                ['H HH',                          '15 15'],                                                    
-                ['m mm',                          '25 25'],                                                    
-                ['s ss',                          '50 50'],                                                    
-                ['a A',                           ' எற்பாடு  எற்பாடு'],                                        
-                ['[ஆண்டின்] DDDo  [நாள்]',        'ஆண்டின் 45வது  நாள்'],                                      
-                ['L',                             '14/02/2010'],                                               
-                ['LL',                            '14 பிப்ரவரி 2010'],                                         
-                ['LLL',                           '14 பிப்ரவரி 2010, 15:25'],                                  
-                ['LLLL',                          'ஞாயிற்றுக்கிழமை, 14 பிப்ரவரி 2010, 15:25'],                 
-                ['l',                             '14/2/2010'],                                                
-                ['ll',                            '14 பிப்ரவரி 2010'],                                         
-                ['lll',                           '14 பிப்ரவரி 2010, 15:25'],                                  
-                ['llll',                          'ஞாயிறு, 14 பிப்ரவரி 2010, 15:25']     
+                ['dddd, MMMM Do YYYY, h:mm:ss a',              'ஞாயிற்றுக்கிழமை, பிப்ரவரி 14வது 2010, 3:25:50  எற்பாடு'],
+                ['ddd, hA',                       'ஞாயிறு, 3 எற்பாடு'],
+                ['M Mo MM MMMM MMM',              '2 2வது 02 பிப்ரவரி பிப்ரவரி'],
+                ['YYYY YY',                       '2010 10'],
+                ['D Do DD',                       '14 14வது 14'],
+                ['d do dddd ddd dd',              '0 0வது ஞாயிற்றுக்கிழமை ஞாயிறு ஞா'],
+                ['DDD DDDo DDDD',                 '45 45வது 045'],
+                ['w wo ww',                       '8 8வது 08'],
+                ['h hh',                          '3 03'],
+                ['H HH',                          '15 15'],
+                ['m mm',                          '25 25'],
+                ['s ss',                          '50 50'],
+                ['a A',                           ' எற்பாடு  எற்பாடு'],
+                ['[ஆண்டின்] DDDo  [நாள்]',        'ஆண்டின் 45வது  நாள்'],
+                ['L',                             '14/02/2010'],
+                ['LL',                            '14 பிப்ரவரி 2010'],
+                ['LLL',                           '14 பிப்ரவரி 2010, 15:25'],
+                ['LLLL',                          'ஞாயிற்றுக்கிழமை, 14 பிப்ரவரி 2010, 15:25'],
+                ['l',                             '14/2/2010'],
+                ['ll',                            '14 பிப்ரவரி 2010'],
+                ['lll',                           '14 பிப்ரவரி 2010, 15:25'],
+                ['llll',                          'ஞாயிறு, 14 பிப்ரவரி 2010, 15:25']
             ],
             b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
             i;
@@ -110,7 +113,7 @@ exports["lang:ta"] = {
     },
 
     "format month" : function (test) {
-        test.expect(12); 
+        test.expect(12);
         var expected = 'ஜனவரி ஜனவரி_பிப்ரவரி பிப்ரவரி_மார்ச் மார்ச்_ஏப்ரல் ஏப்ரல்_மே மே_ஜூன் ஜூன்_ஜூலை ஜூலை_ஆகஸ்ட் ஆகஸ்ட்_செப்டெம்பர் செப்டெம்பர்_அக்டோபர் அக்டோபர்_நவம்பர் நவம்பர்_டிசம்பர் டிசம்பர்'.split("_"), i;
         for (i = 0; i < expected.length; i++) {
             test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);
index cf64a46b24c2766bf4b9711d34e5c33d4f08b06b..f1949acc87f873ff8b3c7d154493f907016262dc 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:th"] = {
     setUp : function (cb) {
         moment.lang('th');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -313,12 +316,12 @@ exports["lang:th"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/th'), 'th', "module should export th");
         }
-        
+
         test.done();
     }
 };
index f2281f231ad52934adae2ccfa2f81cd54b3a3bc6..6bdc8ddcd1bed5ac0054d6d403665dd396cb8a7b 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:tl-ph"] = {
     setUp : function (cb) {
         moment.lang('tl-ph');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
index 222b6cbe2059ea1cbc54768e3afc910502dce842..c5ae0d71343148b8cdbb08663e42d5859ff4f1f5 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:tr"] = {
     setUp : function (cb) {
         moment.lang('tr');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -364,12 +367,12 @@ exports["lang:tr"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/tr'), 'tr', "module should export tr");
         }
-        
+
         test.done();
     }
 };
index 5498a5ddac12da6d7cdb79f23b8f58aec51d6743..21b0f35890cd6dcf862980444b55a51e39ec1c66 100644 (file)
@@ -6,6 +6,9 @@ var moment = require("../../moment");
 exports["lang:tzm-la"] = {
     setUp : function (cb) {
         moment.lang('tzm-la');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -352,12 +355,12 @@ exports["lang:tzm-la"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/tzm-la'), 'tzm-la', "module should export tzm-la");
         }
-        
+
         test.done();
     }
 };
index 79d391c1e8aef7746795b26173d6a07e30d3ef7d..dc7a3345b7f6f47848dbff58633b205600365e5e 100644 (file)
@@ -6,6 +6,9 @@ var moment = require("../../moment");
 exports["lang:tzm"] = {
     setUp : function (cb) {
         moment.lang('tzm');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
index b61b786c56dfb8ba99b839d549f026d4c28963ea..6da4afd9e98ffb8c6908e638eae30ef3a039cbb5 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:uk"] = {
     setUp : function (cb) {
         moment.lang('uk');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -383,12 +386,12 @@ exports["lang:uk"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/uk'), 'uk', "module should export uk");
         }
-        
+
         test.done();
     }
 };
index 6ac3a6a54cbe2d5e94d178336ec5ba45c2801ddb..697ee888d8b6f3db795eeb8f061a7bae4cea9830 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:uz"] = {
     setUp : function (cb) {
         moment.lang('uz');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -350,12 +353,12 @@ exports["lang:uz"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/uz'), 'uz', "module should export uz");
         }
-        
+
         test.done();
     }
 };
index a3856da69dce1425ecfe2f6d68656143e112b5b0..c5bf2e3f1c50c81ec5dec49754390908f1df9219 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:vi"] = {
     setUp : function (cb) {
         moment.lang('vi');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -376,12 +379,12 @@ exports["lang:vi"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/vi'), 'vi', "module should export vi");
         }
-        
+
         test.done();
     }
 };
index c991c57d40bf31a50a7a4956cd03a7be5a368e54..49353ddd3ee20908ce054cd7007093e9d31be1cf 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:zh-cn"] = {
     setUp : function (cb) {
         moment.lang('zh-cn');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
index 6ca0fa9a4832181f09a7d7f9fa0e86eb8c911f6f..a91cf12d99809c8a26e8a4df7906013349874956 100644 (file)
@@ -8,6 +8,9 @@ var moment = require("../../moment");
 exports["lang:zh-tw"] = {
     setUp : function (cb) {
         moment.lang('zh-tw');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
@@ -348,12 +351,12 @@ exports["lang:zh-tw"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/zh-tw'), 'zh-tw', "module should export zh-tw");
         }
-        
+
         test.done();
     }
 };
index 85b4046bfc8392172d9df54c7be3b2dfa9f348aa..0dbd5d207b072c824d052ff20b1d34c79a0e0d65 100644 (file)
@@ -1,6 +1,13 @@
 var moment = require("../../moment");
 
 exports.add = {
+    setUp : function (done) {
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+        done();
+    },
+
     "add short" : function (test) {
         test.expect(12);
 
index c0a3a606c5ea76b31504f2fff8f36f2c9a9d68ff..4d614365d49757752d4c72fc752ec0eefe383bab 100644 (file)
@@ -13,6 +13,13 @@ var getVerifier = function (test) {
 };
 
 exports.create = {
+    setUp : function (done) {
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+        done();
+    },
+
     "array" : function (test) {
         test.expect(8);
         test.ok(moment([2010]).toDate() instanceof Date, "[2010]");
index 2b786557893a8ac9d7f90e13609b7c15cd9aa75b..aa4e23d0a2223ffca749028d1bf131d63a9a1a59 100644 (file)
@@ -1,6 +1,13 @@
 var moment = require("../../moment");
 
 exports.days_in_month = {
+    setUp : function (done) {
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+        done();
+    },
+
     "days in month" : function (test) {
         test.expect(24);
         var months = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], i;
index ea12d78203f6dffc68f4bbb24c91cf2f65ac7ec3..649518e44f1c9bf96590fefe6c619b6beba049d7 100644 (file)
@@ -33,6 +33,13 @@ function dstForYear(year) {
 }
 
 exports.diff = {
+    setUp : function (done) {
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+        done();
+    },
+
     "diff" : function (test) {
         test.expect(5);
 
index e0377054ec8f442e17d649e29a8f2b803fda449f..084a3db3ce8b70eabded715974114bdd4143f6e1 100644 (file)
@@ -1,6 +1,13 @@
 var moment = require("../../moment");
 
 exports.duration = {
+    setUp : function (done) {
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+        done();
+    },
+
     "object instantiation" : function (test) {
         var d = moment.duration({
             years: 2,
index e855719e835ffb58384f1f20d9204ae1ee317923..48fae9ca3e93750d351b58066d487676e0f3c64c 100644 (file)
@@ -1,6 +1,13 @@
 var moment = require("../../moment");
 
 exports.format = {
+    setUp : function (done) {
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+        done();
+    },
+
     "format YY" : function (test) {
         test.expect(1);
 
index 62c25ef0ba149e61af9ef0ca8219b4a2bf6495c4..fb631e1cd5ebb926d9612f816876b8fa6b7e7c54 100644 (file)
@@ -1,6 +1,13 @@
 var moment = require("../../moment");
 
 exports.getters_setters = {
+    setUp : function (done) {
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+        done();
+    },
+
     "getters" : function (test) {
         test.expect(8);
 
index 494a4890d27f145e26a9dd4d6f6b6fee13ffc8b7..fffefcc48db5c8023398eea7a6d919c4c6edcbc6 100644 (file)
@@ -1,6 +1,13 @@
 var moment = require("../../moment");
 
 exports.invalid = {
+    setUp : function (done) {
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+        done();
+    },
+
     "invalid" : function (test) {
         var m = moment.invalid();
         test.equals(m.isValid(), false);
index 7991132b4bdddee3f396afed06f61e6c5578a083..7eae5e36b97151aa5dfe06e9d1e53fd62b58aeda 100644 (file)
@@ -1,6 +1,13 @@
 var moment = require("../../moment");
 
 exports.is_after = {
+    setUp : function (done) {
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+        done();
+    },
+
     "is after without units" : function (test) {
         test.expect(17);
 
index c3b0a4fe7ba3de10c17d11d533ddd24621d1b3fd..3e932d790bc4025790b1e1d62bffd9f76b0c2d43 100644 (file)
@@ -1,6 +1,13 @@
 var moment = require("../../moment");
 
 exports.is_before = {
+    setUp : function (done) {
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+        done();
+    },
+
     "is after without units" : function (test) {
         test.expect(17);
 
index b73521b292996a517bcf44aab1399a338910f678..f57f9ff80e5b94037c7e9db5e29c652981615fd2 100644 (file)
@@ -1,6 +1,13 @@
 var moment = require('../../moment');
 
 exports.is_moment = {
+    setUp : function (done) {
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+        done();
+    },
+
     "is moment object": function (test) {
         test.expect(13);
 
index 96113827916d9807154a836f23bc6efb8cb3f933..0f4bd727064b378cd75a7d7dfeeef049376f48a0 100644 (file)
@@ -1,6 +1,13 @@
 var moment = require("../../moment");
 
 exports.is_same = {
+    setUp : function (done) {
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+        done();
+    },
+
     "is same without units" : function (test) {
         test.expect(17);
 
index 728a2b949c7f522e0edaeff1959c373f6f86c015..410bd69d50c8ba46baff7e65f27dbe5fb48c8b61 100644 (file)
@@ -1,6 +1,13 @@
 var moment = require("../../moment");
 
 exports.is_valid = {
+    setUp : function (done) {
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+        done();
+    },
+
     "array bad month" : function (test) {
         test.expect(2);
         test.equal(moment([2010, -1]).isValid(), false, 'month -1 invalid');
index c624fc1998d6c8f142283e3f0f02e44d319cca78..405b1a2aac762e506c56cd4fb6868a2dd7aa956b 100644 (file)
@@ -1,6 +1,13 @@
 var moment = require("../../moment");
 
 exports.lang = {
+    setUp : function (done) {
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+        done();
+    },
+
     "library getter" : function (test) {
         var r;
         test.expect(8);
index 84d67abaebdd19dcc805110891f4262d44703e39..47a48a4e13d4b121ce7ced5e48a9505c5d740b7e 100644 (file)
@@ -1,6 +1,13 @@
 var moment = require("../../moment");
 
 exports.leapyear = {
+    setUp : function (done) {
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+        done();
+    },
+
     "leap year" : function (test) {
         test.expect(4);
 
index 86fbbd2d2045138d63f9b655bf31432f7e00c7aa..fa0b969c5326823d962225f555228db54ca272e0 100644 (file)
@@ -3,6 +3,10 @@ var moment = require("../../moment");
 exports.listers = {
     setUp : function (cb) {
         moment.lang('en');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+
         cb();
     },
 
index 5f74bc7b9c9eca5007916a498a70fba38801d976..e71da0a8990cc668986cc3ebdf89b9b42d44e666 100644 (file)
@@ -7,6 +7,9 @@ var equalMoment = function (test, a, b, msg) {
 exports.min_max = {
     setUp : function (cb) {
         moment.lang('en');
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
         cb();
     },
 
index ea46b937f64c7ee80e4d16da3cd50929158344bf..e2934c1ef1be92c6b810d72680ea4ab1ee891189 100644 (file)
@@ -1,6 +1,13 @@
 var moment = require("../../moment");
 
 exports.mutable = {
+    setUp : function (done) {
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+        done();
+    },
+
     "manipulation methods" : function (test) {
 
         var mutableMethods = {
index 0982127c90cb338f76b5f53e7018ce2c905269d6..25238b99d2bdec340471410cbe0391a243aa3746 100644 (file)
@@ -3,6 +3,13 @@
 var moment = require("../../moment");
 
 exports.normalizeUnits = {
+    setUp : function (done) {
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+        done();
+    },
+
     "normalize units" : function (test) {
         var fullKeys = ["year", "month", "isoWeek", "week", "day", "hour", "minute", "second", "millisecond", "date", 'dayOfYear', 'weekday', 'isoWeekday', 'weekYear', 'isoWeekYear'],
             aliases = ["y", "M", "W", "w", "d", "h", "m", "s", "ms", "D", 'DDD', 'e', 'E', 'gg', 'GG'],
index 180db693d449019a9e36deefc35fbc65907b7540..bac76eb30de1b05bd53a1de3b67ec385766cfa89 100644 (file)
@@ -4,6 +4,13 @@ var moment = require('../../moment'),
     };
 
 exports.parsing_flags = {
+    setUp : function (done) {
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+        done();
+    },
+
 
     'overflow with array' : function (test) {
 
index b7dd8f1ce7204fc676677a2c086f751a2cb99c54..a8d1c3a76b719f527744a2acb2e8381acbd93935 100644 (file)
@@ -44,6 +44,10 @@ var symbolLang = {
 exports.preparse_postformat = {
     setUp: function (cb) {
         moment.lang('symbol', symbolLang);
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+
         cb();
     },
 
index a98de1baaf6b0219fdf8bc348ae87f6b322d95cc..cf3e3fe75e1ae12bf2ebe13dbe684cdb850a4537 100644 (file)
@@ -1,6 +1,13 @@
 var moment = require("../../moment");
 
 exports.quarter = {
+    setUp : function (done) {
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+        done();
+    },
+
     "library quarter" : function (test) {
         test.expect(7);
 
index 17b928956a57db5abea0b587b76fb5774739c042..b886c6205cc1f676611d2b4cddb2d2d293b36dd6 100644 (file)
@@ -1,9 +1,12 @@
 var moment = require("../../moment");
 
 exports.end_start_of = {
-    setUp : function (cb) {
+    setUp : function (done) {
         moment.lang('en');
-        cb();
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+        done();
     },
 
     tearDown : function (cb) {
index 07cde9ca9a9ff7e9ecab7a0608a57c7deb8c7b60..729404e899e428ae5cc75b5d2eeb4a267f19d7dc 100644 (file)
@@ -1,6 +1,13 @@
 var moment = require("../../moment");
 
 exports.string_prototype = {
+    setUp : function (done) {
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+        done();
+    },
+
     "string prototype overrides call" : function (test) {
         test.expect(1);
 
index 09c2de1a5ef0ce9d2ff9d0c247647816853d8eed..29f75cf13fd92e960c79df812ca8255be8db3ddb 100644 (file)
@@ -1,9 +1,13 @@
 var moment = require("../../moment");
 
 exports.utc = {
-    setUp : function (cb) {
+    setUp : function (done) {
         moment.lang('en');
-        cb();
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+
+        done();
     },
 
     tearDown : function (cb) {
index 345c3862c41d6a77dfaebb59ba06f489b0010c1e..132d6c05b70c6bceb9992f5eec1536e7e0cdb089 100644 (file)
@@ -1,6 +1,13 @@
 var moment = require("../../moment");
 
 exports.week_year = {
+    setUp : function (done) {
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+        done();
+    },
+
     "iso week year": function (test) {
         test.expect(19);
 
index a6eb6de67b82070e7dfe38fd12c2511a8f0c4fdc..c7b8a7201fdc8d51549db6c1f196237856a8dbdd 100644 (file)
@@ -1,6 +1,13 @@
 var moment = require("../../moment");
 
 exports.week_year = {
+    setUp : function (done) {
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+        done();
+    },
+
     "iso weekday": function (test) {
         var i;
         test.expect(7 * 7);
index 272f49de693b6eeca6ea7f932fe3e2f8083cae48..64b29b7566fa27b3957dcbfde1a71e013ce88dc0 100644 (file)
@@ -1,9 +1,13 @@
 var moment = require("../../moment");
 
 exports.weeks = {
-    setUp : function (cb) {
+    setUp : function (done) {
         moment.lang('en');
-        cb();
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+
+        done();
     },
 
     tearDown : function (cb) {
index cd203f6321e2576cf363f97752c8c8d9bf9ef157..7b673d066385919a207d13a6ddfbc466a859774b 100644 (file)
@@ -1,9 +1,13 @@
 var moment = require("../../moment");
 
 exports.zones = {
-    setUp : function (cb) {
+    setUp : function (done) {
         moment.lang('en');
-        cb();
+        moment.createFromInputFallback = function () {
+            throw new Error("input not handled by moment");
+        };
+
+        done();
     },
 
     tearDown : function (cb) {