Tests: fix test-project typecheck (casts, Rule arity) and base-to-string lint warnings

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-10-27 16:17:40 +01:00
co-authored by Claude Opus 5.5
parent a92bc51814
commit 2dafcd0852
3 changed files with 11 additions and 11 deletions
+6 -6
View File
@@ -184,13 +184,13 @@ describe('submitForm — other gates', () => {
})
test('validator messages: full sentences, Polish via localizedRules, own message wins', () => {
expect(required()('')).toBe('Fill in this field.')
expect(minLength(10)('abc')).toBe('Enter at least 10 characters.')
expect(required()('', {})).toBe('Fill in this field.')
expect(minLength(10)('abc', {})).toBe('Enter at least 10 characters.')
const pl = localizedRules('pl-PL')
expect(pl.required()('')).toBe('Uzupełnij to pole.')
expect(pl.minLength(2)('a')).toBe('Wpisz co najmniej 2 znaki.')
expect(pl.minLength(5)('a')).toBe('Wpisz co najmniej 5 znaków.')
expect(pl.email('Mój tekst')('x')).toBe('Mój tekst')
expect(pl.required()('', {})).toBe('Uzupełnij to pole.')
expect(pl.minLength(2)('a', {})).toBe('Wpisz co najmniej 2 znaki.')
expect(pl.minLength(5)('a', {})).toBe('Wpisz co najmniej 5 znaków.')
expect(pl.email('Mój tekst')('x', {})).toBe('Mój tekst')
})
test('the captcha field injected by the widget is not an unknown key', async () => {