Skip to content

Commit d12a160

Browse files
committed
Fix failing test
1 parent 3563aa0 commit d12a160

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/useAjvForm.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ describe('useAJVForm', () => {
126126
expect(validation.isValid).toBe(true);
127127
});
128128

129-
it('isValid should be false when the initial state is set or when reset is called', () => {
129+
it('isValid should be true when the initial state is set or when reset is called', () => {
130130
const initialData = { title: 'Foo' };
131131
const schema: JSONSchemaType<{ title: string }> = {
132132
type: 'object',
@@ -138,15 +138,15 @@ describe('useAJVForm', () => {
138138

139139
const { result } = renderHook(() => useAJVForm(initialData, schema));
140140

141-
expect(result.current.validate().isValid).toBe(false);
141+
expect(result.current.validate().isValid).toBe(true);
142142

143143
result.current.set({ title: 'Bar' });
144144

145145
expect(result.current.validate().isValid).toBe(true);
146146

147147
result.current.reset();
148148

149-
expect(result.current.validate().isValid).toBe(false);
149+
expect(result.current.validate().isValid).toBe(true);
150150
});
151151

152152
it('validates minLength and maxLength for title', () => {

0 commit comments

Comments
 (0)