Skip to content

Commit ea80e71

Browse files
committed
fix(optional-translation-test): setup intl was called twice
1 parent d483350 commit ea80e71

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

tests/helpers/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ function setupApplicationTest(hooks, options) {
2626
setupMirage(hooks);
2727
}
2828

29-
function setupRenderingTest(hooks, options) {
29+
function setupRenderingTest(hooks, options, addTranslation = undefined) {
3030
upstreamSetupRenderingTest(hooks, options);
3131
setupEngine(hooks, "ember-emeis");
32-
setupIntl(hooks, "en");
32+
setupIntl(hooks, "en", addTranslation);
3333
setupMirage(hooks);
3434
hooks.beforeEach(function () {
3535
this.engine.register("service:hostRouter", MockRouter);

tests/integration/helpers/optional-translate-test.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import { render } from "@ember/test-helpers";
22
import { setupRenderingTest } from "dummy/tests/helpers";
33
import { hbs } from "ember-cli-htmlbars";
4-
import { setupIntl } from "ember-intl/test-support";
54
import { module, test } from "qunit";
65

76
module("Integration | Helper | optional-translate", function (hooks) {
8-
setupRenderingTest(hooks);
9-
setupIntl(hooks, { foo: "translation of foo" });
7+
setupRenderingTest(hooks, undefined, { foo: "translation of foo" });
108

119
test("it translates if the translation exists", async function (assert) {
1210
await render(hbs`{{optional-translate "foo"}}`, { owner: this.engine });

0 commit comments

Comments
 (0)