From: Iskren Chernev Date: Fri, 25 Oct 2013 06:36:29 +0000 (-0700) Subject: Removed forEach from format tests X-Git-Tag: 2.4.0~3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bfafa56da85114afe7528d197be8e6143f2c4928;p=thirdparty%2Fmoment.git Removed forEach from format tests --- diff --git a/test/moment/format.js b/test/moment/format.js index 6c3f8c3d0..c961cca8d 100644 --- a/test/moment/format.js +++ b/test/moment/format.js @@ -314,14 +314,17 @@ exports.format = { "calendar day timezone" : function (test) { test.expect(10); + moment.lang('en'); var zones = [60, -60, 90, -90, 360, -360, 720, -720], b = moment().utc().startOf('day').subtract({ m : 1 }), - c = moment().local().startOf('day').subtract({ m : 1 }); + c = moment().local().startOf('day').subtract({ m : 1 }), + i, z, a; - zones.forEach(function (z) { - var a = moment().zone(z).startOf('day').subtract({ m: 1 }); + for (i = 0; i < zones.length; ++i) { + z = zones[i]; + a = moment().zone(z).startOf('day').subtract({ m: 1 }); test.equal(moment(a).zone(z).calendar(), "Yesterday at 11:59 PM", "Yesterday at 11:59 PM, not Today, or the wrong time"); - }); + } test.equal(moment(b).utc().calendar(), "Yesterday at 11:59 PM", "Yesterday at 11:59 PM, not Today, or the wrong time"); test.equal(moment(c).local().calendar(), "Yesterday at 11:59 PM", "Yesterday at 11:59 PM, not Today, or the wrong time");