File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -14,3 +14,30 @@ jest.mock("@shopify/flash-list", () => {
14
14
AnimatedFlashList : MockFlashList ,
15
15
} ;
16
16
} ) ;
17
+
18
+ jest . mock ( "@shopify/flash-list/dist/recyclerview/utils/measureLayout" , ( ) => {
19
+ const originalModule = jest . requireActual (
20
+ "@shopify/flash-list/dist/recyclerview/utils/measureLayout"
21
+ ) ;
22
+ return {
23
+ ...originalModule ,
24
+ measureParentSize : jest . fn ( ) . mockImplementation ( ( ) => ( {
25
+ x : 0 ,
26
+ y : 0 ,
27
+ width : 400 ,
28
+ height : 900 ,
29
+ } ) ) ,
30
+ measureFirstChildLayout : jest . fn ( ) . mockImplementation ( ( ) => ( {
31
+ x : 0 ,
32
+ y : 0 ,
33
+ width : 400 ,
34
+ height : 900 ,
35
+ } ) ) ,
36
+ measureItemLayout : jest . fn ( ) . mockImplementation ( ( ) => ( {
37
+ x : 0 ,
38
+ y : 0 ,
39
+ width : 100 ,
40
+ height : 100 ,
41
+ } ) ) ,
42
+ } ;
43
+ } ) ;
You can’t perform that action at this time.
0 commit comments