How to use the @ngrx/router-store.getSelectors function in @ngrx/router-store

To help you get started, we’ve selected a few @ngrx/router-store examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ngrx / platform / modules / router-store / spec / router_selectors.spec.ts View on Github external
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);
    });
github ngrx / platform / modules / router-store / spec / router_selectors.spec.ts View on Github external
beforeEach(() => {
      state = {
        router: mockData,
      };

      selectors = getSelectors((state: State) => state.router);
    });