@@ -3,14 +3,15 @@ import {measureFunction} from 'reassure';
3
3
import SidebarUtils from '@libs/SidebarUtils' ;
4
4
import CONST from '@src/CONST' ;
5
5
import ONYXKEYS from '@src/ONYXKEYS' ;
6
+ import { PersonalDetails } from '@src/types/onyx' ;
6
7
import Policy from '@src/types/onyx/Policy' ;
7
8
import Report from '@src/types/onyx/Report' ;
8
9
import ReportAction from '@src/types/onyx/ReportAction' ;
9
10
import createCollection from '../utils/collections/createCollection' ;
11
+ import createPersonalDetails from '../utils/collections/personalDetails' ;
10
12
import createRandomPolicy from '../utils/collections/policies' ;
11
13
import createRandomReportAction from '../utils/collections/reportActions' ;
12
14
import createRandomReport from '../utils/collections/reports' ;
13
- import * as LHNTestUtils from '../utils/LHNTestUtils' ;
14
15
import waitForBatchedUpdates from '../utils/waitForBatchedUpdates' ;
15
16
16
17
beforeAll ( ( ) =>
@@ -37,12 +38,16 @@ const reportActions = createCollection<ReportAction>(
37
38
( index ) => createRandomReportAction ( index ) ,
38
39
) ;
39
40
40
- const mockedResponseMap : Partial < Report > = getMockedReports ( 5000 ) ;
41
+ const personalDetails = createCollection < PersonalDetails > (
42
+ ( item ) => item . accountID ,
43
+ ( index ) => createPersonalDetails ( index ) ,
44
+ ) ;
45
+
46
+ const mockedResponseMap = getMockedReports ( 5000 ) as Record < `${typeof ONYXKEYS . COLLECTION . REPORT } `, Report > ;
41
47
const runs = CONST . PERFORMANCE_TESTS . RUNS ;
42
48
43
49
test ( 'getOptionData on 5k reports' , async ( ) => {
44
50
const report = createRandomReport ( 1 ) ;
45
- const personalDetails = LHNTestUtils . fakePersonalDetails ;
46
51
const preferredLocale = 'en' ;
47
52
const policy = createRandomPolicy ( 1 ) ;
48
53
const parentReportAction = createRandomReportAction ( 1 ) ;
0 commit comments