File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ describe('useAJVForm', () => {
126
126
expect ( validation . isValid ) . toBe ( true ) ;
127
127
} ) ;
128
128
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' , ( ) => {
130
130
const initialData = { title : 'Foo' } ;
131
131
const schema : JSONSchemaType < { title : string } > = {
132
132
type : 'object' ,
@@ -138,15 +138,15 @@ describe('useAJVForm', () => {
138
138
139
139
const { result } = renderHook ( ( ) => useAJVForm ( initialData , schema ) ) ;
140
140
141
- expect ( result . current . validate ( ) . isValid ) . toBe ( false ) ;
141
+ expect ( result . current . validate ( ) . isValid ) . toBe ( true ) ;
142
142
143
143
result . current . set ( { title : 'Bar' } ) ;
144
144
145
145
expect ( result . current . validate ( ) . isValid ) . toBe ( true ) ;
146
146
147
147
result . current . reset ( ) ;
148
148
149
- expect ( result . current . validate ( ) . isValid ) . toBe ( false ) ;
149
+ expect ( result . current . validate ( ) . isValid ) . toBe ( true ) ;
150
150
} ) ;
151
151
152
152
it ( 'validates minLength and maxLength for title' , ( ) => {
You can’t perform that action at this time.
0 commit comments