Formatting

This commit is contained in:
pietervdvn 2022-06-20 01:58:20 +02:00
parent ca91241c3b
commit 6e93ab0be6

View file

@ -5,13 +5,13 @@ import ValidatedTextField from "../../UI/Input/ValidatedTextField";
import {fail} from "assert"; import {fail} from "assert";
describe("ValidatedTextFields", () => { describe("ValidatedTextFields", () => {
it("should all have description in the translations", () => { it("should all have description in the translations", () => {
const ts = Translations.t.validation; const ts = Translations.t.validation;
const missingTranslations = Array.from(ValidatedTextField.allTypes.keys()) const missingTranslations = Array.from(ValidatedTextField.allTypes.keys())
.filter(key => ts[key] === undefined || ts[key].description === undefined) .filter(key => ts[key] === undefined || ts[key].description === undefined)
if(missingTranslations !== []){ if (missingTranslations !== []) {
fail("undefined", "a `description` for "+missingTranslations.join(", ") , "These validated text fields don't have a type name defined in en.json. (Did you just add one? Run `npm run generate:translations`)") fail("undefined", "a `description` for " + missingTranslations.join(", "), "These validated text fields don't have a type name defined in en.json. (Did you just add one? Run `npm run generate:translations`)")
} }
}) })
}) })