Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should return undefined from selectCurrentRoute if routerState does not exist', () => {
interface State {
router: any;
}
let state: State;
state = {
router: undefined,
};
selectors = getSelectors((state: State) => state.router);
const result = selectors.selectCurrentRoute(state);
expect(result).toEqual(undefined);
});
beforeEach(() => {
state = {
router: mockData,
};
selectors = getSelectors((state: State) => state.router);
});