You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{renderHook}from'@testing-library/react-hooks';import*asreactReduxfrom'react-redux';import{mockWindonwLocation}from'@tests/utility';import{history}from'@lib/history';import{useAfterSignIn}from'./useAfterSignIn';describe('useAfterSignIn',()=>{describe('onRouteAfterSignIn',()=>{constuseSelectorMock=jest.spyOn(reactRedux,'useSelector');beforeEach(()=>{useSelectorMock.mockClear();});it('should be redirect to bank main, if not set the prevPathname and not set url',async()=>{useSelectorMock.mockReturnValue({isTransferPortal: false,});mockWindonwLocation({});const{ result }=renderHook(()=>useAfterSignIn());result.current.onRouteAfterSignIn();expect(history.location.pathname).toBe('/');expect(history.location.hash).toBe('');expect(history.location.search).toBe('');});});});
Version
Test Scenario
Test Code
Reference
The text was updated successfully, but these errors were encountered: