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:
co-authored by
Claude Opus 5.5
parent
a92bc51814
commit
2dafcd0852
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user