mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
Merge pull request #1015 from roramirez/show-missing-string-test-translations
TestSuite: Show the missing strings for translations files.
This commit is contained in:
commit
b28c5e6807
@ -60,6 +60,7 @@
|
|||||||
"feedme": "latest",
|
"feedme": "latest",
|
||||||
"helmet": "^3.6.1",
|
"helmet": "^3.6.1",
|
||||||
"iconv-lite": "latest",
|
"iconv-lite": "latest",
|
||||||
|
"mocha-logger": "^1.0.5",
|
||||||
"moment": "latest",
|
"moment": "latest",
|
||||||
"request": "^2.81.0",
|
"request": "^2.81.0",
|
||||||
"rrule-alt": "^2.2.5",
|
"rrule-alt": "^2.2.5",
|
||||||
|
@ -2,6 +2,7 @@ var fs = require("fs");
|
|||||||
var path = require("path");
|
var path = require("path");
|
||||||
var chai = require("chai");
|
var chai = require("chai");
|
||||||
var expect = chai.expect;
|
var expect = chai.expect;
|
||||||
|
var mlog = require("mocha-logger");
|
||||||
|
|
||||||
describe("Translations have the same keys as en.js", function() {
|
describe("Translations have the same keys as en.js", function() {
|
||||||
var translations = require("../../../translations/translations.js");
|
var translations = require("../../../translations/translations.js");
|
||||||
@ -31,6 +32,8 @@ describe("Translations have the same keys as en.js", function() {
|
|||||||
expect(fileKeys).to.deep.equal(baseKeys);
|
expect(fileKeys).to.deep.equal(baseKeys);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
if (e instanceof chai.AssertionError) {
|
if (e instanceof chai.AssertionError) {
|
||||||
|
diff = baseKeys.filter(function(x) { return fileKeys.indexOf(x) < 0 });
|
||||||
|
mlog.pending("Missing Translations for language " + tr + ": ", diff);
|
||||||
test.skip();
|
test.skip();
|
||||||
} else {
|
} else {
|
||||||
throw e;
|
throw e;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user