forked from MapComplete/MapComplete
Rename tests to test; add a few tests
This commit is contained in:
parent
df706d2f97
commit
c3859d56c6
28 changed files with 33 additions and 5 deletions
14
test/UI/ValidatedTextFieldTranslations.ts
Normal file
14
test/UI/ValidatedTextFieldTranslations.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
import {describe} from 'mocha'
|
||||
import {expect} from 'chai'
|
||||
import Translations from "../../UI/i18n/Translations";
|
||||
import ValidatedTextField from "../../UI/Input/ValidatedTextField";
|
||||
|
||||
describe("ValidatedTextFields", () => {
|
||||
|
||||
it("should all have description in the translations", () => {
|
||||
const ts = Translations.t.validation;
|
||||
const missingTranslations = Array.from(ValidatedTextField.allTypes.keys())
|
||||
.filter(key => ts[key] === undefined || ts[key].description === undefined)
|
||||
expect(missingTranslations, "These validated text fields don't have a type name defined in en.json. (Did you just add one? Run `npm run generate:translations`)").to.be.empty
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue