@@ -13,7 +13,7 @@ import ROUTES from '@src/ROUTES';
1313import type { Policy , PolicyTagLists , QuickAction , RecentWaypoint } from '@src/types/onyx' ;
1414import type { Participant } from '@src/types/onyx/IOU' ;
1515import type { SplitShares } from '@src/types/onyx/Transaction' ;
16- import * as IOU from '../../../src/libs/actions/IOU' ;
16+ import type * as IOU from '../../../src/libs/actions/IOU' ;
1717import * as Split from '../../../src/libs/actions/IOU/Split' ;
1818import * as TrackExpense from '../../../src/libs/actions/IOU/TrackExpense' ;
1919import DistanceRequestUtils from '../../../src/libs/DistanceRequestUtils' ;
@@ -29,7 +29,6 @@ jest.mock('@libs/actions/IOU', () => {
2929 const actualNav = jest . requireActual < typeof IOU > ( '@libs/actions/IOU' ) ;
3030 return {
3131 ...actualNav ,
32- createDistanceRequest : jest . fn ( ) ,
3332 } ;
3433} ) ;
3534
@@ -46,6 +45,7 @@ jest.mock('@libs/actions/IOU/Split', () => {
4645 const actualSplit = jest . requireActual < typeof Split > ( '@libs/actions/IOU/Split' ) ;
4746 return {
4847 ...actualSplit ,
48+ createDistanceRequest : jest . fn ( ) ,
4949 startSplitBill : jest . fn ( ) ,
5050 resetSplitShares : jest . fn ( ) ,
5151 } ;
@@ -1215,7 +1215,7 @@ describe('MoneyRequest', () => {
12151215 } ) ;
12161216
12171217 // The function must return after trackExpense and not call createDistanceRequest
1218- expect ( IOU . createDistanceRequest ) . not . toHaveBeenCalled ( ) ;
1218+ expect ( Split . createDistanceRequest ) . not . toHaveBeenCalled ( ) ;
12191219 } ) ;
12201220
12211221 it ( 'should call trackExpense for TRACK iouType with valid waypoints when not from manual distance step and skipping confirmation' , async ( ) => {
@@ -1319,7 +1319,7 @@ describe('MoneyRequest', () => {
13191319 draftTransactionIDs : [ baseParams . transactionID ] ,
13201320 } ) ;
13211321
1322- expect ( IOU . createDistanceRequest ) . toHaveBeenCalledWith (
1322+ expect ( Split . createDistanceRequest ) . toHaveBeenCalledWith (
13231323 expect . objectContaining ( {
13241324 report : baseParams . report ,
13251325 // participants: getParticipantsForTest(),
@@ -1358,7 +1358,7 @@ describe('MoneyRequest', () => {
13581358 draftTransactionIDs : [ baseParams . transactionID ] ,
13591359 } ) ;
13601360
1361- expect ( IOU . createDistanceRequest ) . toHaveBeenCalledWith (
1361+ expect ( Split . createDistanceRequest ) . toHaveBeenCalledWith (
13621362 expect . objectContaining ( {
13631363 report : baseParams . report ,
13641364 // participants: getParticipantsForTest(),
0 commit comments