@@ -40,21 +40,23 @@ describe('useChartXRangeSelection', () => {
4040
4141 describe ( 'initial state' , ( ) => {
4242 it ( 'should return brush configuration when not disabled' , ( ) => {
43- const { result} = renderHook ( useChartXRangeSelection , { initialProps : {
43+ const { result} = renderHook ( useChartXRangeSelection , {
44+ initialProps : {
4445 chartRef : mockChartRef ,
45- } }
46- ) ;
46+ } ,
47+ } ) ;
4748
4849 expect ( result . current . brush ) . toBeDefined ( ) ;
4950 expect ( result . current . toolBox ) . toBeDefined ( ) ;
5051 } ) ;
5152
5253 it ( 'should return undefined brush when disabled' , ( ) => {
53- const { result} = renderHook ( useChartXRangeSelection , { initialProps : {
54+ const { result} = renderHook ( useChartXRangeSelection , {
55+ initialProps : {
5456 chartRef : mockChartRef ,
5557 disabled : true ,
56- } }
57- ) ;
58+ } ,
59+ } ) ;
5860
5961 expect ( result . current . brush ) . toBeUndefined ( ) ;
6062 expect ( result . current . toolBox ) . toBeUndefined ( ) ;
@@ -65,11 +67,12 @@ describe('useChartXRangeSelection', () => {
6567 it ( 'should hide tooltip when brush starts' , ( ) => {
6668 const onSelectionStart = jest . fn ( ) ;
6769
68- const { result} = renderHook ( useChartXRangeSelection , { initialProps : {
70+ const { result} = renderHook ( useChartXRangeSelection , {
71+ initialProps : {
6972 chartRef : mockChartRef ,
7073 onSelectionStart,
71- } }
72- ) ;
74+ } ,
75+ } ) ;
7376
7477 act ( ( ) => {
7578 result . current . onBrushStart ( { } as any , mockChartInstance ) ;
@@ -85,11 +88,12 @@ describe('useChartXRangeSelection', () => {
8588 const disconnectSpy = jest . fn ( ) ;
8689 jest . spyOn ( require ( 'echarts' ) , 'disconnect' ) . mockImplementation ( disconnectSpy ) ;
8790
88- const { result} = renderHook ( useChartXRangeSelection , { initialProps : {
91+ const { result} = renderHook ( useChartXRangeSelection , {
92+ initialProps : {
8993 chartRef : mockChartRef ,
9094 chartsGroupName : 'test-group' ,
91- } }
92- ) ;
95+ } ,
96+ } ) ;
9397
9498 act ( ( ) => {
9599 result . current . onBrushStart ( { } as any , mockChartInstance ) ;
@@ -140,11 +144,12 @@ describe('useChartXRangeSelection', () => {
140144 getEchartsInstance : ( ) => mockEchartsInstance ,
141145 } as unknown as EChartsReact ;
142146
143- const { result} = renderHook ( useChartXRangeSelection , { initialProps : {
147+ const { result} = renderHook ( useChartXRangeSelection , {
148+ initialProps : {
144149 chartRef : mockChartRef ,
145150 onSelectionEnd,
146- } }
147- ) ;
151+ } ,
152+ } ) ;
148153
149154 const mockEvent = {
150155 areas : [
@@ -208,11 +213,12 @@ describe('useChartXRangeSelection', () => {
208213 getEchartsInstance : ( ) => mockEchartsInstance ,
209214 } as unknown as EChartsReact ;
210215
211- const { result} = renderHook ( useChartXRangeSelection , { initialProps : {
216+ const { result} = renderHook ( useChartXRangeSelection , {
217+ initialProps : {
212218 chartRef : mockChartRef ,
213219 onSelectionEnd,
214- } }
215- ) ;
220+ } ,
221+ } ) ;
216222
217223 const mockEvent = {
218224 areas : [
@@ -270,11 +276,12 @@ describe('useChartXRangeSelection', () => {
270276 getEchartsInstance : ( ) => mockEchartsInstance ,
271277 } as unknown as EChartsReact ;
272278
273- const { result} = renderHook ( useChartXRangeSelection , { initialProps : {
279+ const { result} = renderHook ( useChartXRangeSelection , {
280+ initialProps : {
274281 chartRef : mockChartRef ,
275282 chartsGroupName : 'test-group' ,
276- } }
277- ) ;
283+ } ,
284+ } ) ;
278285
279286 const mockEvent = {
280287 areas : [ { coordRange : [ 10 , 90 ] , panelId : 'test-panel-id' } ] ,
@@ -321,11 +328,12 @@ describe('useChartXRangeSelection', () => {
321328 < div data-test-id = "action-menu" > Action Menu</ div >
322329 ) ) ;
323330
324- const { result} = renderHook ( useChartXRangeSelection , { initialProps : {
331+ const { result} = renderHook ( useChartXRangeSelection , {
332+ initialProps : {
325333 chartRef : mockChartRef ,
326334 actionMenuRenderer,
327- } }
328- ) ;
335+ } ,
336+ } ) ;
329337
330338 act ( ( ) => {
331339 result . current . onBrushEnd (
@@ -382,13 +390,14 @@ describe('useChartXRangeSelection', () => {
382390 getEchartsInstance : ( ) => mockEchartsInstance ,
383391 } as unknown as EChartsReact ;
384392
385- const { result} = renderHook ( useChartXRangeSelection , { initialProps : {
393+ const { result} = renderHook ( useChartXRangeSelection , {
394+ initialProps : {
386395 chartRef : mockChartRef ,
387396 actionMenuRenderer : _params => (
388397 < div data-test-id = "action-menu" > Action Menu</ div >
389398 ) ,
390- } }
391- ) ;
399+ } ,
400+ } ) ;
392401
393402 act ( ( ) => {
394403 result . current . onBrushEnd (
@@ -414,10 +423,11 @@ describe('useChartXRangeSelection', () => {
414423 getEchartsInstance : ( ) => mockEchartsInstance ,
415424 } as unknown as EChartsReact ;
416425
417- renderHook ( useChartXRangeSelection , { initialProps : {
426+ renderHook ( useChartXRangeSelection , {
427+ initialProps : {
418428 chartRef : mockChartRef ,
419- } }
420- ) ;
429+ } ,
430+ } ) ;
421431
422432 await waitFor ( ( ) => {
423433 expect ( mockEchartsInstance . dispatchAction ) . toHaveBeenCalledWith ( {
@@ -498,11 +508,12 @@ describe('useChartXRangeSelection', () => {
498508 panelId : 'initial-panel-id' ,
499509 } ;
500510
501- renderHook ( useChartXRangeSelection , { initialProps : {
511+ renderHook ( useChartXRangeSelection , {
512+ initialProps : {
502513 chartRef : mockChartRef ,
503514 initialSelection,
504- } }
505- ) ;
515+ } ,
516+ } ) ;
506517
507518 await waitFor ( ( ) => {
508519 expect ( mockEchartsInstance . dispatchAction ) . toHaveBeenCalledWith ( {
@@ -702,11 +713,12 @@ describe('useChartXRangeSelection', () => {
702713 getEchartsInstance : ( ) => mockEchartsInstance ,
703714 } as unknown as EChartsReact ;
704715
705- const { result} = renderHook ( useChartXRangeSelection , { initialProps : {
716+ const { result} = renderHook ( useChartXRangeSelection , {
717+ initialProps : {
706718 chartRef : mockChartRef ,
707719 onInsideSelectionClick,
708- } }
709- ) ;
720+ } ,
721+ } ) ;
710722
711723 // Create a selection first
712724 act ( ( ) => {
@@ -782,11 +794,12 @@ describe('useChartXRangeSelection', () => {
782794 getEchartsInstance : ( ) => mockEchartsInstance ,
783795 } as unknown as EChartsReact ;
784796
785- const { result} = renderHook ( useChartXRangeSelection , { initialProps : {
797+ const { result} = renderHook ( useChartXRangeSelection , {
798+ initialProps : {
786799 chartRef : mockChartRef ,
787800 onOutsideSelectionClick,
788- } }
789- ) ;
801+ } ,
802+ } ) ;
790803
791804 // Create a selection first
792805 act ( ( ) => {
@@ -860,11 +873,12 @@ describe('useChartXRangeSelection', () => {
860873 getEchartsInstance : ( ) => mockEchartsInstance ,
861874 } as unknown as EChartsReact ;
862875
863- const { result} = renderHook ( useChartXRangeSelection , { initialProps : {
876+ const { result} = renderHook ( useChartXRangeSelection , {
877+ initialProps : {
864878 chartRef : mockChartRef ,
865879 onOutsideSelectionClick,
866- } }
867- ) ;
880+ } ,
881+ } ) ;
868882
869883 // Create a selection first
870884 act ( ( ) => {
0 commit comments