Sha256: 620113fa5c9fd29263f42f12f570482466323b9bcf6f0c1f9f79b88825fcc72e
Contents?: true
Size: 1.01 KB
Versions: 27
Compression:
Stored size: 1.01 KB
Contents
/*global QUnit:false*/ import moment from '../moment'; import { defineCommonLocaleTests } from './helpers/common-locale'; import { setupDeprecationHandler, teardownDeprecationHandler } from './helpers/deprecation-handler'; import { test } from './qunit'; export function localeModule (name, lifecycle) { QUnit.module('locale:' + name, { beforeEach : function () { moment.locale(name); moment.createFromInputFallback = function (config) { throw new Error('input not handled by moment: ' + config._i); }; setupDeprecationHandler(test, moment, 'locale'); if (lifecycle && lifecycle.setup) { lifecycle.setup(); } }, afterEach : function () { moment.locale('en'); teardownDeprecationHandler(test, moment, 'locale'); if (lifecycle && lifecycle.teardown) { lifecycle.teardown(); } } }); defineCommonLocaleTests(name, -1, -1); }
Version data entries
27 entries across 27 versions & 1 rubygems