Sha256: 340ac02e5f7ebe2bfbcd25b39d29f357a9726a3cd371eef9fe45d8d7ce469d69
Contents?: true
Size: 1.02 KB
Versions: 19
Compression:
Stored size: 1.02 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
19 entries across 19 versions & 1 rubygems