11import type * as ReactNavigation from '@react-navigation/native' ;
22import { renderHook } from '@testing-library/react-native' ;
33import Onyx from 'react-native-onyx' ;
4- import useDismissOnReportRemoval from '@hooks/useDismissOnReportRemoval ' ;
4+ import useDismissOnMoneyRequestReportRemoval from '@hooks/useDismissOnMoneyRequestReportRemoval ' ;
55import Navigation from '@navigation/Navigation' ;
66import CONST from '@src/CONST' ;
77import ONYXKEYS from '@src/ONYXKEYS' ;
@@ -41,7 +41,7 @@ function buildChatReport(id: string): Report {
4141 } as Report ;
4242}
4343
44- describe ( 'useDismissOnReportRemoval ' , ( ) => {
44+ describe ( 'useDismissOnMoneyRequestReportRemoval ' , ( ) => {
4545 beforeAll ( ( ) => {
4646 Onyx . init ( { keys : ONYXKEYS } ) ;
4747 } ) ;
@@ -57,7 +57,7 @@ describe('useDismissOnReportRemoval', () => {
5757 await Onyx . set ( `${ ONYXKEYS . COLLECTION . REPORT } ${ REPORT_A_ID } ` , buildMoneyRequestReport ( REPORT_A_ID ) ) ;
5858 await waitForBatchedUpdates ( ) ;
5959
60- const { rerender} = renderHook ( ( { reportID} : { reportID : string } ) => useDismissOnReportRemoval ( reportID ) , {
60+ const { rerender} = renderHook ( ( { reportID} : { reportID : string } ) => useDismissOnMoneyRequestReportRemoval ( reportID ) , {
6161 initialProps : { reportID : REPORT_A_ID } ,
6262 } ) ;
6363
@@ -69,7 +69,7 @@ describe('useDismissOnReportRemoval', () => {
6969 } ) ;
7070
7171 it ( 'does not dismiss the modal on first render even if the report is missing' , async ( ) => {
72- renderHook ( ( { reportID} : { reportID : string } ) => useDismissOnReportRemoval ( reportID ) , {
72+ renderHook ( ( { reportID} : { reportID : string } ) => useDismissOnMoneyRequestReportRemoval ( reportID ) , {
7373 initialProps : { reportID : REPORT_A_ID } ,
7474 } ) ;
7575 await waitForBatchedUpdates ( ) ;
@@ -82,7 +82,7 @@ describe('useDismissOnReportRemoval', () => {
8282 await Onyx . set ( `${ ONYXKEYS . COLLECTION . REPORT } ${ REPORT_A_ID } ` , buildMoneyRequestReport ( REPORT_A_ID ) ) ;
8383 await waitForBatchedUpdates ( ) ;
8484
85- const { rerender} = renderHook ( ( { reportID} : { reportID : string } ) => useDismissOnReportRemoval ( reportID ) , {
85+ const { rerender} = renderHook ( ( { reportID} : { reportID : string } ) => useDismissOnMoneyRequestReportRemoval ( reportID ) , {
8686 initialProps : { reportID : REPORT_A_ID } ,
8787 } ) ;
8888
@@ -97,7 +97,7 @@ describe('useDismissOnReportRemoval', () => {
9797 await Onyx . set ( `${ ONYXKEYS . COLLECTION . REPORT } ${ REPORT_A_ID } ` , buildChatReport ( REPORT_A_ID ) ) ;
9898 await waitForBatchedUpdates ( ) ;
9999
100- const { rerender} = renderHook ( ( { reportID} : { reportID : string } ) => useDismissOnReportRemoval ( reportID ) , {
100+ const { rerender} = renderHook ( ( { reportID} : { reportID : string } ) => useDismissOnMoneyRequestReportRemoval ( reportID ) , {
101101 initialProps : { reportID : REPORT_A_ID } ,
102102 } ) ;
103103
@@ -115,7 +115,7 @@ describe('useDismissOnReportRemoval', () => {
115115 await Onyx . set ( `${ ONYXKEYS . COLLECTION . REPORT } ${ REPORT_A_ID } ` , buildMoneyRequestReport ( REPORT_A_ID ) ) ;
116116 await waitForBatchedUpdates ( ) ;
117117
118- const { rerender} = renderHook ( ( { reportID} : { reportID : string } ) => useDismissOnReportRemoval ( reportID ) , {
118+ const { rerender} = renderHook ( ( { reportID} : { reportID : string } ) => useDismissOnMoneyRequestReportRemoval ( reportID ) , {
119119 initialProps : { reportID : REPORT_A_ID } ,
120120 } ) ;
121121
@@ -132,7 +132,7 @@ describe('useDismissOnReportRemoval', () => {
132132 await Onyx . set ( `${ ONYXKEYS . COLLECTION . REPORT } ${ REPORT_A_ID } ` , buildMoneyRequestReport ( REPORT_A_ID , { stateNum : CONST . REPORT . STATE_NUM . OPEN } ) ) ;
133133 await waitForBatchedUpdates ( ) ;
134134
135- const { rerender} = renderHook ( ( { reportID} : { reportID : string } ) => useDismissOnReportRemoval ( reportID ) , {
135+ const { rerender} = renderHook ( ( { reportID} : { reportID : string } ) => useDismissOnMoneyRequestReportRemoval ( reportID ) , {
136136 initialProps : { reportID : REPORT_A_ID } ,
137137 } ) ;
138138
@@ -161,7 +161,7 @@ describe('useDismissOnReportRemoval', () => {
161161 await Onyx . set ( `${ ONYXKEYS . COLLECTION . REPORT } ${ REPORT_A_ID } ` , buildMoneyRequestReport ( REPORT_A_ID , { stateNum : CONST . REPORT . STATE_NUM . OPEN } ) ) ;
162162 await waitForBatchedUpdates ( ) ;
163163
164- const { rerender} = renderHook ( ( { reportID} : { reportID : string } ) => useDismissOnReportRemoval ( reportID ) , {
164+ const { rerender} = renderHook ( ( { reportID} : { reportID : string } ) => useDismissOnMoneyRequestReportRemoval ( reportID ) , {
165165 initialProps : { reportID : REPORT_A_ID } ,
166166 } ) ;
167167
0 commit comments