add test that english and german localization files have same keys
This commit is contained in:
parent
0a938bc287
commit
c2ad8f7fe1
3 changed files with 31 additions and 0 deletions
15
spec/support/localization/localization.spec.ts
Normal file
15
spec/support/localization/localization.spec.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import "jasmine";
|
||||
import * as fs from "fs-extra";
|
||||
import * as path from "path";
|
||||
|
||||
describe("English and german localization files", () => {
|
||||
const localizationPath = "./src/lang/";
|
||||
const en: Record<string, unknown> = fs.readJSONSync(path.join(localizationPath, "en.json"));
|
||||
const de: Record<string, unknown> = fs.readJSONSync(path.join(localizationPath, "de.json"));
|
||||
|
||||
it("should have the same keys.", () => {
|
||||
const deKeys = Object.keys(de);
|
||||
const enKeys = Object.keys(en);
|
||||
expect(deKeys).toEqual(enKeys);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue