From: Isaac Cambron Date: Thu, 24 Jul 2014 22:31:06 +0000 (-0400) Subject: fixing tests X-Git-Tag: 2.8.0~12^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c7022fb9bcfffb94d3471c4089dc841b3207517;p=thirdparty%2Fmoment.git fixing tests --- diff --git a/test/moment/locale.js b/test/moment/locale.js index d46b4200f..78ad35bc5 100644 --- a/test/moment/locale.js +++ b/test/moment/locale.js @@ -5,6 +5,7 @@ exports.locale = { moment.createFromInputFallback = function () { throw new Error("input not handled by moment"); }; + moment.locale('en'); done(); }, @@ -218,6 +219,13 @@ exports.locale = { test.done(); }, + "changing the global locale doesn't affect existing duration instances" : function (test) { + var mom = moment.duration() + moment.locale('fr'); + test.equal('en', mom.locale()); + test.done(); + }, + "duration deprecations" : function (test) { test.equal(moment.duration().lang(), moment.duration().localeData(), "duration.lang is the same as duration.localeData"); test.done(); @@ -415,10 +423,9 @@ exports.locale = { }, "changing the global locale doesn't affect existing instances" : function (test) { - moment.locale('en'); var mom = moment(); - moment.locale('pr'); - test.equal('en', moment.locale()); + moment.locale('fr'); + test.equal('en', mom.locale()); test.done(); } };