refactor: improve testing setup

This commit is contained in:
Johannes Loher 2022-02-13 18:34:03 +01:00
parent 0c8f1e8bda
commit de060b381e
8 changed files with 48 additions and 30 deletions

View file

@ -2,14 +2,10 @@
//
// SPDX-License-Identifier: MIT
import * as fs from "fs-extra";
import * as path from "path";
import en from "../../lang/en.json";
import de from "../../lang/de.json";
describe("English and german localization files", () => {
const localizationPath = "./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);