Upgrade QUnit to latest version
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import PreloadStore from 'preload-store';
|
||||
import LocalizationInitializer from 'discourse/initializers/localization';
|
||||
|
||||
module("initializer:localization", {
|
||||
QUnit.module("initializer:localization", {
|
||||
_locale: I18n.locale,
|
||||
_translations: I18n.translations,
|
||||
|
||||
setup() {
|
||||
beforeEach() {
|
||||
I18n.locale = "fr";
|
||||
|
||||
I18n.translations = {
|
||||
@@ -28,16 +28,16 @@ module("initializer:localization", {
|
||||
};
|
||||
},
|
||||
|
||||
teardown() {
|
||||
afterEach() {
|
||||
I18n.locale = this._locale;
|
||||
I18n.translations = this._translations;
|
||||
}
|
||||
});
|
||||
|
||||
test("translation overrides", function() {
|
||||
QUnit.test("translation overrides", assert => {
|
||||
PreloadStore.store('translationOverrides', {"js.composer.reply":"WAT","js.topic.reply.help":"foobar"});
|
||||
LocalizationInitializer.initialize(this.registry);
|
||||
|
||||
equal(I18n.t("composer.reply"), "WAT", "overrides existing translation in current locale");
|
||||
equal(I18n.t("topic.reply.help"), "foobar", "overrides translation in default locale");
|
||||
});
|
||||
assert.equal(I18n.t("composer.reply"), "WAT", "overrides existing translation in current locale");
|
||||
assert.equal(I18n.t("topic.reply.help"), "foobar", "overrides translation in default locale");
|
||||
});
|
||||
Reference in New Issue
Block a user