File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -148,8 +148,12 @@ function isActiveRoute(routePath: Route): boolean {
148
148
}
149
149
150
150
/**
151
+ * Navigates to a specified route.
151
152
* Main navigation method for redirecting to a route.
152
- * @param [options] - linkTo function options. They allow to specify if the replace action should be performed.
153
+ *
154
+ * @param {Route } route - The route to navigate to.
155
+ * @param {LinkToOptions } [options] - Optional navigation options.
156
+ * @param {boolean } [options.forceReplace] - If true, the navigation action will replace the current route instead of pushing a new one.
153
157
*/
154
158
function navigate ( route : Route , options ?: LinkToOptions ) {
155
159
if ( ! canNavigate ( 'navigate' , { route} ) ) {
Original file line number Diff line number Diff line change @@ -23,6 +23,9 @@ jest.mock('../../src/libs/Navigation/navigationRef', () => ({
23
23
getState : ( ) => ( {
24
24
routes : [ ] ,
25
25
} ) ,
26
+ getRootState : ( ) => ( {
27
+ routes : [ ] ,
28
+ } ) ,
26
29
} ) ) ;
27
30
jest . mock ( '@components/Icon/Expensicons' ) ;
28
31
You can’t perform that action at this time.
0 commit comments