mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
change missing translations log, disable console.log in unit tests
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user