Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
alshakero committed Jan 10, 2025
1 parent f652535 commit 1621a29
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,14 @@ const render = ( { flow, queryParams = {} } ) => {
flow,
} ),
{
wrapper: ( { children } ) => (
<MemoryRouter initialEntries={ [ addQueryArgs( `/setup/${ flow.name }`, queryParams ) ] }>
{ children }
</MemoryRouter>
),
wrapper: ( { children } ) => {
// The hook depends on window.location.search to determine the query params.
Reflect.deleteProperty( global.window, 'location' );
window.location = new URL(
'https://example.com/' + addQueryArgs( `/setup/${ flow.name }`, queryParams )
) as unknown as Location;
return <MemoryRouter initialEntries={ [ '/setup' ] }>{ children }</MemoryRouter>;
},
}
);
};
Expand Down

0 comments on commit 1621a29

Please sign in to comment.