From 4f3fce4ad2252e9dfa00c7300eb73bb36965db5b Mon Sep 17 00:00:00 2001 From: Iskren Chernev Date: Wed, 25 Dec 2013 02:48:08 +0100 Subject: [PATCH] Remove forEach from test case @changelog @section tests --- test/lang/ko.js | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/test/lang/ko.js b/test/lang/ko.js index fe60b2bee..f49038155 100644 --- a/test/lang/ko.js +++ b/test/lang/ko.js @@ -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(); } }; -- 2.47.2