@@ -2,7 +2,7 @@ import { act, fireEvent, render, screen } from '@testing-library/react';
2
2
import * as React from 'react' ;
3
3
import * as Yup from 'yup' ;
4
4
5
- import { FieldArray , Formik , isFunction } from '../src' ;
5
+ import { FieldArray , FieldArrayRenderProps , Formik , isFunction } from '../src' ;
6
6
7
7
const noop = ( ) => { } ;
8
8
@@ -80,7 +80,7 @@ describe('<FieldArray />', () => {
80
80
describe ( 'props.push()' , ( ) => {
81
81
it ( 'should add a value to the end of the field array' , ( ) => {
82
82
let formikBag : any ;
83
- let arrayHelpers : any ;
83
+ let arrayHelpers : FieldArrayRenderProps ;
84
84
render (
85
85
< TestForm >
86
86
{ ( props : any ) => {
@@ -154,7 +154,7 @@ describe('<FieldArray />', () => {
154
154
it ( 'should push clone not actual reference' , ( ) => {
155
155
let personTemplate = { firstName : '' , lastName : '' } ;
156
156
let formikBag : any ;
157
- let arrayHelpers : any ;
157
+ let arrayHelpers : FieldArrayRenderProps ;
158
158
render (
159
159
< TestForm initialValues = { { people : [ ] } } >
160
160
{ ( props : any ) => {
@@ -187,7 +187,7 @@ describe('<FieldArray />', () => {
187
187
describe ( 'props.pop()' , ( ) => {
188
188
it ( 'should remove and return the last value from the field array' , ( ) => {
189
189
let formikBag : any ;
190
- let arrayHelpers : any ;
190
+ let arrayHelpers : FieldArrayRenderProps ;
191
191
render (
192
192
< TestForm >
193
193
{ ( props : any ) => {
@@ -217,7 +217,7 @@ describe('<FieldArray />', () => {
217
217
describe ( 'props.swap()' , ( ) => {
218
218
it ( 'should swap two values in field array' , ( ) => {
219
219
let formikBag : any ;
220
- let arrayHelpers : any ;
220
+ let arrayHelpers : FieldArrayRenderProps ;
221
221
render (
222
222
< TestForm >
223
223
{ ( props : any ) => {
@@ -246,7 +246,7 @@ describe('<FieldArray />', () => {
246
246
describe ( 'props.insert()' , ( ) => {
247
247
it ( 'should insert a value at given index of field array' , ( ) => {
248
248
let formikBag : any ;
249
- let arrayHelpers : any ;
249
+ let arrayHelpers : FieldArrayRenderProps ;
250
250
render (
251
251
< TestForm >
252
252
{ ( props : any ) => {
@@ -275,7 +275,7 @@ describe('<FieldArray />', () => {
275
275
describe ( 'props.replace()' , ( ) => {
276
276
it ( 'should replace a value at given index of field array' , ( ) => {
277
277
let formikBag : any ;
278
- let arrayHelpers : any ;
278
+ let arrayHelpers : FieldArrayRenderProps ;
279
279
render (
280
280
< TestForm >
281
281
{ ( props : any ) => {
@@ -304,7 +304,7 @@ describe('<FieldArray />', () => {
304
304
describe ( 'props.unshift()' , ( ) => {
305
305
it ( 'should add a value to start of field array and return its length' , ( ) => {
306
306
let formikBag : any ;
307
- let arrayHelpers : any ;
307
+ let arrayHelpers : FieldArrayRenderProps ;
308
308
render (
309
309
< TestForm >
310
310
{ ( props : any ) => {
@@ -334,7 +334,7 @@ describe('<FieldArray />', () => {
334
334
335
335
describe ( 'props.remove()' , ( ) => {
336
336
let formikBag : any ;
337
- let arrayHelpers : any ;
337
+ let arrayHelpers : FieldArrayRenderProps ;
338
338
339
339
beforeEach ( ( ) => {
340
340
render (
@@ -396,7 +396,7 @@ describe('<FieldArray />', () => {
396
396
describe ( 'given array-like object representing errors' , ( ) => {
397
397
it ( 'should run arrayHelpers successfully' , async ( ) => {
398
398
let formikBag : any ;
399
- let arrayHelpers : any ;
399
+ let arrayHelpers : FieldArrayRenderProps ;
400
400
render (
401
401
< TestForm >
402
402
{ ( props : any ) => {
@@ -440,7 +440,7 @@ describe('<FieldArray />', () => {
440
440
} ) ;
441
441
442
442
let formikBag : any ;
443
- let arrayHelpers : any ;
443
+ let arrayHelpers : FieldArrayRenderProps ;
444
444
445
445
beforeEach ( ( ) => {
446
446
render (
0 commit comments