@@ -23,7 +23,7 @@ describe('Table.Expand', () => {
2323
2424 it ( 'renders expand row correctly' , ( ) => {
2525 resetWarned ( ) ;
26- const errorSpy = vi . spyOn ( console , 'error' ) . mockImplementation ( ( ) => { } ) ;
26+ const errorSpy = jest . spyOn ( console , 'error' ) . mockImplementation ( ( ) => { } ) ;
2727 const wrapper = mount ( createTable ( { expandedRowRender } ) ) ;
2828 expect ( wrapper . find ( 'tbody tr' ) ) . toHaveLength ( 2 ) ;
2929 expect ( errorSpy ) . toHaveBeenCalledWith (
@@ -33,7 +33,7 @@ describe('Table.Expand', () => {
3333 } ) ;
3434
3535 it ( 'pass proper parameters to expandedRowRender' , ( ) => {
36- const rowRender = vi . fn ( ( ) => < div > expanded row</ div > ) ;
36+ const rowRender = jest . fn ( ( ) => < div > expanded row</ div > ) ;
3737 const expandableProps = props => ( { expandable : { expandedRowRender : rowRender , ...props } } ) ;
3838 const wrapper = mount ( createTable ( expandableProps ( ) ) ) ;
3939 wrapper . setProps ( expandableProps ( { expandedRowKeys : [ 0 ] } ) ) ;
@@ -263,7 +263,7 @@ describe('Table.Expand', () => {
263263 describe ( 'config expand column index' , ( ) => {
264264 it ( 'not show EXPAND_COLUMN if expandable is false' , ( ) => {
265265 resetWarned ( ) ;
266- const errorSpy = vi . spyOn ( console , 'error' ) . mockImplementation ( ( ) => { } ) ;
266+ const errorSpy = jest . spyOn ( console , 'error' ) . mockImplementation ( ( ) => { } ) ;
267267
268268 const wrapper = mount (
269269 createTable ( {
@@ -281,7 +281,7 @@ describe('Table.Expand', () => {
281281
282282 it ( 'renders expand icon to the specify column' , ( ) => {
283283 resetWarned ( ) ;
284- const errorSpy = vi . spyOn ( console , 'error' ) . mockImplementation ( ( ) => { } ) ;
284+ const errorSpy = jest . spyOn ( console , 'error' ) . mockImplementation ( ( ) => { } ) ;
285285
286286 const wrapper = mount (
287287 createTable ( {
@@ -318,7 +318,7 @@ describe('Table.Expand', () => {
318318
319319 it ( 'de-duplicate of EXPAND_COLUMN' , ( ) => {
320320 resetWarned ( ) ;
321- const errorSpy = vi . spyOn ( console , 'error' ) . mockImplementation ( ( ) => { } ) ;
321+ const errorSpy = jest . spyOn ( console , 'error' ) . mockImplementation ( ( ) => { } ) ;
322322
323323 const wrapper = mount (
324324 createTable ( {
@@ -431,7 +431,7 @@ describe('Table.Expand', () => {
431431 } ) ;
432432
433433 it ( 'renders expend row class correctly' , ( ) => {
434- const expandedRowClassName = vi . fn ( ) . mockReturnValue ( 'expand-row-test-class-name' ) ;
434+ const expandedRowClassName = jest . fn ( ) . mockReturnValue ( 'expand-row-test-class-name' ) ;
435435 const wrapper = mount (
436436 createTable ( {
437437 expandable : {
@@ -461,7 +461,7 @@ describe('Table.Expand', () => {
461461 } ) ;
462462
463463 it ( 'renders expend row class correctly using children without expandedRowRender' , ( ) => {
464- const expandedRowClassName = vi . fn ( ) . mockReturnValue ( 'expand-row-test-class-name' ) ;
464+ const expandedRowClassName = jest . fn ( ) . mockReturnValue ( 'expand-row-test-class-name' ) ;
465465
466466 const _data = [ { ...sampleData [ 0 ] , children : [ sampleData [ 1 ] ] } ] ;
467467
@@ -495,7 +495,7 @@ describe('Table.Expand', () => {
495495 } ) ;
496496
497497 it ( 'fires expand change event' , ( ) => {
498- const onExpand = vi . fn ( ) ;
498+ const onExpand = jest . fn ( ) ;
499499 const wrapper = mount (
500500 createTable ( {
501501 expandable : {
@@ -512,7 +512,7 @@ describe('Table.Expand', () => {
512512 } ) ;
513513
514514 it ( 'fires onExpandedRowsChange event' , ( ) => {
515- const onExpandedRowsChange = vi . fn ( ) ;
515+ const onExpandedRowsChange = jest . fn ( ) ;
516516 const wrapper = mount (
517517 createTable ( {
518518 expandedRowRender,
@@ -537,7 +537,7 @@ describe('Table.Expand', () => {
537537 } ) ;
538538
539539 it ( 'expandRowByClick' , ( ) => {
540- const onExpand = vi . fn ( ) ;
540+ const onExpand = jest . fn ( ) ;
541541 const wrapper = mount (
542542 createTable ( {
543543 expandable : {
@@ -597,7 +597,7 @@ describe('Table.Expand', () => {
597597 // https://github.com/ant-design/ant-design/issues/23894
598598 it ( 'should be collapsible when use `expandIcon` & `expandRowByClick`' , ( ) => {
599599 const data = [ { key : 0 , name : 'Lucy' , age : 27 } ] ;
600- const onExpand = vi . fn ( ) ;
600+ const onExpand = jest . fn ( ) ;
601601 const wrapper = mount (
602602 createTable ( {
603603 expandable : {
@@ -625,7 +625,7 @@ describe('Table.Expand', () => {
625625 // https://github.com/ant-design/ant-design/issues/23894
626626 it ( 'should be collapsible when `expandRowByClick` without custom `expandIcon`' , ( ) => {
627627 const data = [ { key : 0 , name : 'Lucy' , age : 27 } ] ;
628- const onExpand = vi . fn ( ) ;
628+ const onExpand = jest . fn ( ) ;
629629 const wrapper = mount (
630630 createTable ( {
631631 expandable : {
@@ -646,7 +646,7 @@ describe('Table.Expand', () => {
646646
647647 it ( 'should be collapsible when `expandRowByClick` with custom `expandIcon` and event.stopPropagation' , ( ) => {
648648 const data = [ { key : 0 , name : 'Lucy' , age : 27 } ] ;
649- const onExpand = vi . fn ( ) ;
649+ const onExpand = jest . fn ( ) ;
650650 const wrapper = mount (
651651 createTable ( {
652652 expandable : {
@@ -676,7 +676,7 @@ describe('Table.Expand', () => {
676676
677677 it ( 'support invalid expandIcon' , ( ) => {
678678 const data = [ { key : 0 , name : 'Lucy' , age : 27 } ] ;
679- const onExpand = vi . fn ( ) ;
679+ const onExpand = jest . fn ( ) ;
680680 const wrapper = mount (
681681 createTable ( {
682682 expandable : {
@@ -693,7 +693,7 @@ describe('Table.Expand', () => {
693693
694694 it ( 'warning for use `expandedRowRender` and nested table in the same time' , ( ) => {
695695 resetWarned ( ) ;
696- const errorSpy = vi . spyOn ( console , 'error' ) . mockImplementation ( ( ) => { } ) ;
696+ const errorSpy = jest . spyOn ( console , 'error' ) . mockImplementation ( ( ) => { } ) ;
697697 mount ( createTable ( { expandedRowRender, data : [ { children : [ ] } ] } ) ) ;
698698 expect ( errorSpy ) . toHaveBeenCalledWith (
699699 'Warning: `expandedRowRender` should not use with nested Table' ,
@@ -702,7 +702,7 @@ describe('Table.Expand', () => {
702702 } ) ;
703703
704704 it ( 'should only trigger once' , ( ) => {
705- const expandedRowRender = vi . fn ( ( ) => < p > extra data</ p > ) ;
705+ const expandedRowRender = jest . fn ( ( ) => < p > extra data</ p > ) ;
706706 render (
707707 createTable ( {
708708 expandable : {
0 commit comments