forked from MapComplete/MapComplete
Formatting
This commit is contained in:
parent
ca91241c3b
commit
6e93ab0be6
1 changed files with 9 additions and 9 deletions
|
@ -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`)")
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue