mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-29 20:49:54 +00:00
Skip translation test on fail
This commit is contained in:
parent
cd8bee1371
commit
406ae4e8c3
@ -13,11 +13,24 @@ describe("Translations have the same keys as en.js", function() {
|
||||
|
||||
Object.keys(translations).forEach(function(tr) {
|
||||
var fileName = translations[tr];
|
||||
it.skip(fileName + " should match", function() {
|
||||
it(fileName + " should match", function() {
|
||||
var fileContent = stripComments(fs.readFileSync(fileName, "utf8"));
|
||||
var fileTranslations = JSON.parse(fileContent);
|
||||
var fileKeys = Object.keys(fileTranslations).sort();
|
||||
expect(fileKeys).to.deep.equal(baseKeys);
|
||||
|
||||
// TODO: when all translations are fixed, use
|
||||
// expect(fileKeys).to.deep.equal(baseKeys);
|
||||
|
||||
// Then delete this block:
|
||||
try {
|
||||
expect(fileKeys).to.deep.equal(baseKeys);
|
||||
} catch(e) {
|
||||
if (e instanceof chai.AssertionError) {
|
||||
this.skip();
|
||||
} else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user