From: Iskren Chernev Date: Fri, 24 Jan 2014 08:29:56 +0000 (-0800) Subject: Workaround safari bug X-Git-Tag: 2.6.0~44^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=refs%2Fpull%2F1441%2Fhead;p=thirdparty%2Fmoment.git Workaround safari bug 13 March 2011 is not handled properly in Safari. Detect bug and exit test early. --- diff --git a/test/moment/add_subtract.js b/test/moment/add_subtract.js index 2d651b0db..85b4046bf 100644 --- a/test/moment/add_subtract.js +++ b/test/moment/add_subtract.js @@ -223,7 +223,12 @@ exports.add = { }, "add across DST" : function (test) { - test.expect(3); + // Detect Safari bug and bail. Hours on 13th March 2011 are shifted + // with 1 ahead. + if (new Date(2011, 2, 13, 5, 0, 0).getHours() !== 5) { + test.done(); + return; + } var a = moment(new Date(2011, 2, 12, 5, 0, 0)), b = moment(new Date(2011, 2, 12, 5, 0, 0)),