change missing translations log, disable console.log in unit tests

This commit is contained in:
Karsten Hassel
2021-06-12 22:17:51 +02:00
parent a5f7c946cc
commit 2af4009a93
5 changed files with 13 additions and 19 deletions

View File

@@ -153,6 +153,7 @@ describe("Translations", function () {
describe("Same keys", function () {
let base;
let missing = [];
beforeAll(function (done) {
const dom = new JSDOM(
@@ -170,6 +171,10 @@ describe("Translations", function () {
};
});
afterAll(function () {
console.log(missing);
});
for (let language in translations) {
if (language === "en") {
continue;
@@ -210,7 +215,7 @@ describe("Translations", function () {
} catch (e) {
if (e.message.match(/expect.*toEqual/)) {
const diff = base.filter((key) => !keys.includes(key));
console.log(`Missing Translations for language ${language}: ${diff}`);
missing.push(`Missing Translations for language ${language}: ${diff}`);
} else {
throw e;
}