Add ESLint Jest (#10261)

This commit is contained in:
Michael Weimann
2023-03-01 16:23:35 +01:00
committed by GitHub
parent db7748b743
commit 5398db21ad
55 changed files with 336 additions and 351 deletions
+6 -9
View File
@@ -93,20 +93,17 @@ describe("languageHandler", function () {
});
describe("when translations exist in language", () => {
beforeEach(function (done) {
beforeEach(function () {
stubClient();
setLanguage("en").then(done);
setLanguage("en");
setMissingEntryGenerator((key) => key.split("|", 2)[1]);
});
it("translates a string to german", function (done) {
setLanguage("de")
.then(function () {
const translated = _t(basicString);
expect(translated).toBe("Räume");
})
.then(done);
it("translates a string to german", async () => {
await setLanguage("de");
const translated = _t(basicString);
expect(translated).toBe("Räume");
});
it.each(testCasesEn)("%s", (_d, translationString, variables, tags, result) => {