]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Remove forEach from test case
authorIskren Chernev <iskren.chernev@gmail.com>
Wed, 25 Dec 2013 01:48:08 +0000 (02:48 +0100)
committerIskren Chernev <iskren.chernev@gmail.com>
Wed, 25 Dec 2013 20:22:17 +0000 (21:22 +0100)
@changelog
@section tests

test/lang/ko.js

index fe60b2beebabc4f3a59cdab386c454194432515f..f49038155b6569bf6760418e39b3281c2176181c 100644 (file)
@@ -36,7 +36,7 @@ exports["lang:kr"] = {
         }
         test.done();
     },
-    
+
     "parse meridiem" : function (test) {
         var elements = [{
             expression : "1981년 9월 8일 오후 2시 30분",
@@ -59,22 +59,24 @@ exports["lang:kr"] = {
             outputFormat : "H",
             expected : "16"
         }];
-  
+
         test.expect(elements.length);
-        
-        elements.forEach(function (it) {
-            var actual = moment(it.expression, it.inputFormat).format(it.outputFormat);
-            
+
+        var i, l, it, actual;
+        for (i = 0, l = elements.length; i < l; ++i) {
+            it = elements[i];
+            actual = moment(it.expression, it.inputFormat).format(it.outputFormat);
+
             test.equal(
                 actual,
-                it.expected, 
+                it.expected,
                 "'" + it.outputFormat + "' of '" + it.expression + "' must be '" + it.expected + "' but was '" + actual + "'."
             );
-        });
-        
+        }
+
         test.done();
     },
-    
+
     "format" : function (test) {
         test.expect(22);
 
@@ -399,12 +401,12 @@ exports["lang:kr"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/ko'), 'ko', "module should export ko");
         }
-        
+
         test.done();
     }
 };