history#createMemoryHistory JavaScript Examples

The following examples show how to use history#createMemoryHistory. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.test.js    From bank-client with MIT License 6 votes vote down vote up
describe('<FirstName />', () => {
  const history = createMemoryHistory();
  const store = configureStore({}, history);
  const onValidateFields = () => null;

  it('should render a information', () => {
    const { container } = render(
      <Provider store={store}>
        <IntlProvider locale={DEFAULT_LOCALE}>
          <Form>
            <FirstName onValidateFields={onValidateFields} />
          </Form>
        </IntlProvider>
      </Provider>,
    );
    expect(container.firstChild).toMatchSnapshot();
  });
});
Example #2
Source File: path-back.test.js    From horondi_client_fe with MIT License 6 votes vote down vote up
describe('Path-back component tests', () => {
  const history = createMemoryHistory();
  let wrapper;

  beforeEach(() => {
    wrapper = render(
      <Router history={history}>
        <PathBack />
      </Router>
    );
  });

  it('should render PathBack', () => {
    expect(wrapper).toBeDefined();
  });

  it('should render description of path', () => {
    expect(screen.getByText(/toMain/i)).toBeInTheDocument();
    expect(screen.getByText(/toCatalog/i)).toBeInTheDocument();
    expect(screen.getByText(/yourCart/i)).toBeInTheDocument();
  });
});
Example #3
Source File: setupTests.js    From fred with MIT License 6 votes vote down vote up
global.renderWithRouter = function renderWithRouter(
  ui,
  {
    route = "/",
    history = createMemoryHistory({ initialEntries: [route] })
  } = {}
) {
  return {
    ...render(<Router history={history}>{ui}</Router>),
    history
  };
};
Example #4
Source File: index.test.js    From awsboilerplate with MIT License 6 votes vote down vote up
describe('<Header />', () => {
  const history = createMemoryHistory();
  const store = configureStore({}, history);

  it('should render a div', () => {
    const { container } = render(
      <Provider store={store}>
        <IntlProvider locale="en">
          <ConnectedRouter history={history}>
            <Header />
          </ConnectedRouter>
        </IntlProvider>
      </Provider>,
    );
    expect(container.firstChild).toMatchSnapshot();
  });
});
Example #5
Source File: react-router.js    From spring-boot-ecommerce with Apache License 2.0 6 votes vote down vote up
MemoryRouter =
/*#__PURE__*/
function (_React$Component) {
  _inheritsLoose(MemoryRouter, _React$Component);

  function MemoryRouter() {
    var _this;

    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
    _this.history = createMemoryHistory(_this.props);
    return _this;
  }

  var _proto = MemoryRouter.prototype;

  _proto.render = function render() {
    return React.createElement(Router, {
      history: this.history,
      children: this.props.children
    });
  };

  return MemoryRouter;
}(React.Component)
Example #6
Source File: index.test.js    From hackchat-client with Do What The F*ck You Want To Public License 6 votes vote down vote up
describe('<Header />', () => {
  const history = createMemoryHistory();
  const store = configureStore({}, history);

  it('should render a <div> tag', () => {
    const { container } = render(
      <Provider store={store}>
        <IntlProvider locale="en">
          <ConnectedRouter history={history}>
            <Header />
          </ConnectedRouter>
        </IntlProvider>
      </Provider>,
    );
    expect(container.querySelector('div')).not.toBeNull();
  });
});
Example #7
Source File: index.test.js    From bank-client with MIT License 6 votes vote down vote up
describe('<AmountMoney />', () => {
  const history = createMemoryHistory();
  const store = configureStore({}, history);
  const onValidateFields = () => null;

  it('should render a AmountMoney', () => {
    const { container } = render(
      <Provider store={store}>
        <IntlProvider locale={DEFAULT_LOCALE}>
          <Form>
            <AmountMoney onValidateFields={onValidateFields} />
          </Form>
        </IntlProvider>
      </Provider>,
    );
    expect(container.firstChild).toMatchSnapshot();
  });
});
Example #8
Source File: react-router.js    From Learning-Redux with MIT License 6 votes vote down vote up
MemoryRouter =
/*#__PURE__*/
function (_React$Component) {
  _inheritsLoose(MemoryRouter, _React$Component);

  function MemoryRouter() {
    var _this;

    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
    _this.history = createMemoryHistory(_this.props);
    return _this;
  }

  var _proto = MemoryRouter.prototype;

  _proto.render = function render() {
    return React.createElement(Router, {
      history: this.history,
      children: this.props.children
    });
  };

  return MemoryRouter;
}(React.Component)
Example #9
Source File: RideInProgress.spec.js    From carpal-fe with MIT License 6 votes vote down vote up
beforeEach(() => {
    history = createMemoryHistory();
    store = mockStore({
        locations: {
            route: {
                start: [],
                end: []
            }
        }
    });
});
Example #10
Source File: LandingPage.test.js    From grants-fe with MIT License 6 votes vote down vote up
describe("Login/Register route to correct forms", () => {
  test("Register button routes to RegisterForm", async () => {
    const history = createMemoryHistory();

    const { container, getByText } = renderRedux(
      <Router history={history}>
        <LandingPage />
      </Router>,
      {
        initialReducerState: {},
      }
    );

    expect(container.innerHTML).toMatch("Get help with your grant today!");
    fireEvent.click(getByText(/register/i));
    expect(history.location.pathname).toBe("/RegisterForm");
  });
  test("Login button routes to LoginForm", () => {
    const history = createMemoryHistory();

    const { container, getByText } = renderRedux(
      <Router history={history}>
        <LandingPage />
      </Router>,
      {
        initialReducerState: {},
      }
    );

    expect(container.innerHTML).toMatch("Get help with your grant today!");
    fireEvent.click(getByText(/login/i));
    expect(history.location.pathname).toBe("/LoginForm");
  });
});
Example #11
Source File: BookingPage.js    From git-brunching with GNU General Public License v3.0 6 votes vote down vote up
BookingPage = (props) => {
  const memoryHistory = createMemoryHistory();
  const history = useHistory();
  const { selected } = props;


  return (
    <div className={style.container}>
      {selected == null ? <NotFound />
        : (
          <div className={style.contentContainer}>
            {/* A surrounding div for styling purposes */}
            <div className={style.headerContainer}>
              <div className={style.header}>
                <div
                  className={style.logo}
                  onClick={() => { if (window.confirm('Are you sure you want to leave before booking? Progress will not be saved'))changePath("/", history)}}
                >
                  <Logo />
                </div>
                <h1 className={style.restaurantName}>{selected.Name}</h1>
              </div>
            </div>
            {/* Memory is used to navigate as we don't want to change URL each time */}
            <Router history={memoryHistory}>
              <Switch>
                <Route path="/details" component={() => <ContentContainer type="detail" />} />
                <Route path="/confirmation" component={() => <ContentContainer type="confirmation" />} />
                <Route path="/complete" component={() => <ConfirmedBooking history={history} />} />
                <Route path="/" component={() => <ContentContainer type="time" mainHistory={history} />} />
              </Switch>
            </Router>
          </div>
        )}

    </div>
  );
}
Example #12
Source File: App.test.js    From say-their-names-web with MIT License 6 votes vote down vote up
test('renders Home Page', () => {
  const history = createMemoryHistory();
  history.push('/');

  const { getByText } = render(
    <Router history={history}>
      <App />
    </Router>
  );

  expect(getByText(/Delayed justice is injustice/i)).toBeInTheDocument();
});
Example #13
Source File: List.test.js    From web-client with Apache License 2.0 6 votes vote down vote up
it("renders with or without a name", () => {
    const history = createMemoryHistory();
    act(() => {
        ReactDOM.createRoot(container)
            .render(<MemoryRouter>
                <AuthContext.Provider value={{ user: null }}>
                    <UsersList history={history} />
                </AuthContext.Provider>
            </MemoryRouter>
            );
    });
    expect(container.innerHTML).toMatch(/Create user<\/button>/);
});
Example #14
Source File: index.test.js    From bank-client with MIT License 6 votes vote down vote up
describe('<Subheader />', () => {
  const history = createMemoryHistory();
  const store = configureStore({}, history);

  it('should render a information', () => {
    const messages = {
      title: {
        id: `test.title`,
        defaultMessage: 'title',
      },
    };

    const pageTitle = <FormattedMessage {...messages.title} />;
    const { container } = render(
      <Provider store={store}>
        <IntlProvider locale={DEFAULT_LOCALE}>
          <Subheader pageTitle={pageTitle} />
        </IntlProvider>
      </Provider>,
    );
    expect(container.firstChild).toMatchSnapshot();
  });
});
Example #15
Source File: NotFound.test.js    From say-their-names-web with MIT License 6 votes vote down vote up
describe('<NotFound />', () => {
  test('renders NotFound', () => {
    const history = createMemoryHistory();
    history.push('/');

    const { getByText } = render(
      <Router history={history}>
        <NotFound />
      </Router>
    );

    expect(getByText('404'));
    expect(getByText('Page not found'));
    expect(
      getByText(
        'Not all those who wander are lost, but it seems you may have taken a wrong turn.'
      )
    );
    expect(getByText('BACK TO HOME'));
  });

  test('renders NotFound with custom short and long messages', () => {
    const history = createMemoryHistory();
    history.push('/');

    const { getByText } = render(
      <Router history={history}>
        <NotFound message="message" longMessage="longMessage" />
      </Router>
    );

    expect(getByText('message'));
    expect(getByText('longMessage'));
  });
});
Example #16
Source File: TestingRouter.js    From viade_en1b with MIT License 5 votes vote down vote up
history = createMemoryHistory()
Example #17
Source File: history.js    From Changes with MIT License 5 votes vote down vote up
history =
  process.env.NODE_ENV === 'test'
    ? createMemoryHistory()
    : createBrowserHistory()
Example #18
Source File: store.js    From substrate-authn-faucet-frontend with GNU General Public License v3.0 5 votes vote down vote up
history = process.env.NODE_ENV === 'test' ? createMemoryHistory() : createBrowserHistory()
Example #19
Source File: promo-code-edit.spec.js    From horondi_admin with MIT License 5 votes vote down vote up
history = createMemoryHistory()
Example #20
Source File: BackNavigation.test.js    From say-their-names-web with MIT License 5 votes vote down vote up
describe('<BackNavigation />', () => {
  test('renders BackNavigation', () => {
    const history = createMemoryHistory();

    const { getByText } = render(
      <Router history={history}>
        <BackNavigation
          text="text"
          link="https://www.google.com"
          longText="link long text"
          linkText="link text"
          backLink="/"
          backState={{ sampleState: true }}
          external={false}
        />
      </Router>
    );

    expect(getByText('text'));
    expect(getByText('link long text'));
    expect(getByText('link text'));
  });

  test('renders BackNavigation with correct navigation', () => {
    const history = createMemoryHistory();

    // Mock props
    const mockBackLink = '/';
    const mockLink = '/test-link';

    const { getByText } = render(
      <Router history={history}>
        <BackNavigation
          text="text"
          link={mockLink}
          longText="link long text"
          linkText="link text"
          backLink={mockBackLink}
          backState={{ sampleState: true }}
          external={false}
        />
      </Router>
    );

    fireEvent.click(getByText('text'));
    expect(history.location.pathname).toBe(mockBackLink);

    fireEvent.click(getByText('link text'));
    expect(history.location.pathname).toBe(mockLink);
  });
});
Example #21
Source File: product-list-page.spec.js    From horondi_client_fe with MIT License 5 votes vote down vote up
history = createMemoryHistory()
Example #22
Source File: Navigation.test.js    From say-their-names-web with MIT License 5 votes vote down vote up
describe('<Navigation />', () => {
  test('renders Navigation', () => {
    const history = createMemoryHistory();

    const { getByText, getByAltText } = render(
      <Router history={history}>
        <Navigation />
      </Router>
    );

    expect(getByText('SAY THEIR NAMES'));
    expect(getByAltText('Say Their Names Logo'));

    expect(getByText('Home'));
    expect(getByText('Donations'));
    expect(getByText('Petitions'));
    expect(getByText('About'));
  });

  test('renders correct links', () => {
    const history = createMemoryHistory();

    const { getByText } = render(
      <Router history={history}>
        <Navigation />
      </Router>
    );

    fireEvent.click(getByText('Home'));
    expect(history.location.pathname).toBe('/');

    fireEvent.click(getByText('Donations'));
    expect(history.location.pathname).toBe('/donations');

    fireEvent.click(getByText('Petitions'));
    expect(history.location.pathname).toBe('/petitions');

    fireEvent.click(getByText('About'));
    expect(history.location.pathname).toBe('/about');
  });
});
Example #23
Source File: history.js    From movies with MIT License 5 votes vote down vote up
history = (typeof window !== 'undefined' && window.document)
  ? createBrowserHistory()
  : createMemoryHistory()
Example #24
Source File: Petition.test.js    From say-their-names-web with MIT License 5 votes vote down vote up
describe('<Petition />', () => {
  test('renders Petition', () => {
    const history = createMemoryHistory();
    const { getByText, getByAltText } = render(
      <Router history={history}>
        <Petition
          id="1"
          title="title"
          description="description"
          img="https://www.google.ca"
          type="type"
          path="path"
        />
      </Router>
    );

    expect(getByText('TYPE'));
    expect(getByAltText('Image for title'));
    expect(getByText('title'));
    expect(getByText('description'));
    expect(getByText('FIND OUT MORE'));
  });
  test('renders correct links', () => {
    const history = createMemoryHistory();
    const { getByText } = render(
      <Router history={history}>
        <Petition
          id="1"
          title="title"
          description="description"
          img="https://www.google.ca"
          type="type"
          path="path"
        />
      </Router>
    );

    fireEvent.click(getByText('FIND OUT MORE'));
    expect(history.location.pathname).toBe('/path/1');
  });
});
Example #25
Source File: ForgotPasswordPage.test.jsx    From frontend-app-authn with GNU Affero General Public License v3.0 5 votes vote down vote up
history = createMemoryHistory()
Example #26
Source File: App.js    From akashlytics-deploy with GNU General Public License v3.0 5 votes vote down vote up
history = createMemoryHistory({
  initialEntries: ["/"],
  initialIndex: 1
})
Example #27
Source File: ResetPasswordPage.test.jsx    From frontend-app-authn with GNU Affero General Public License v3.0 5 votes vote down vote up
history = createMemoryHistory()
Example #28
Source File: CategoriesContainer.spec.js    From docs.tryhackme.com with MIT License 4 votes vote down vote up
describe('CategoriesContainer', () => {
  jest.useFakeTimers()
  beforeEach(() => {
    jest.clearAllTimers()
    jest.clearAllMocks()
  })
  it('renders successfully', () => {
    const wrapper = shallow(<MemoryRouter initialEntries={['/']}><CategoriesContainer homepageCategories={homepageCategories} /></MemoryRouter>)
    expect(wrapper).not.toBeNull()
  })

  it('contains the homepage categories as default props', () => {
    const wrapper = mount(<MemoryRouter initialEntries={['/']}><CategoriesContainer homepageCategories={homepageCategories} /></MemoryRouter>)
    expect(wrapper.find('CategoriesContainer').prop('homepageCategories')).toEqual(homepageCategories)
    wrapper.unmount()
  })

  it(`should render with ${homepageCategories.length} CategoryComponent instances`, () => {
    const wrapper = mount(<MemoryRouter initialEntries={['/']}><CategoriesContainer homepageCategories={homepageCategories} /></MemoryRouter>)
    const categoriesContainer = wrapper.find('CategoriesContainer')
    expect(categoriesContainer.find('CategoriesComponent')).toHaveLength(homepageCategories.length)
    wrapper.unmount()
  })

  // it('should render 18 categories when the load more button is clicked', () => {
  //   const wrapper = mount(<MemoryRouter initialEntries={['/']}><CategoriesContainer homepageCategories={homepageCategories} /></MemoryRouter>)
  //   const categoriesContainer = wrapper.find('CategoriesContainer')
  //   expect(categoriesContainer.find('CategoriesComponent')).toHaveLength(9)
  //   expect(categoriesContainer.find(`.${styles.categories}`)).toHaveLength(1)
  //   expect(categoriesContainer.find(`.${styles.postCategoryAction}`)).toHaveLength(1)
  //   expect(categoriesContainer.find(`.${styles.loadMoreBtn}`)).toHaveLength(1)
  //   expect(categoriesContainer.find(`.${styles.loadMoreBtnDark}`)).toHaveLength(1)
  //   act(() => {
  //     categoriesContainer.find(`.${styles.loadMoreBtn}`).simulate('click')
  //     jest.runAllTimers()
  //   })
  //   wrapper.update()
  //   expect(wrapper.find('CategoriesContainer').find('CategoriesComponent')).toHaveLength(18)
  //   wrapper.unmount()
  // })

  // it('displays total number of categories once all have been loaded', () => {
  //   const wrapper = mount(<MemoryRouter initialEntries={['/']}><CategoriesContainer homepageCategories={homepageCategories} /></MemoryRouter>)
  //   const categoriesContainer = wrapper.find('CategoriesContainer')
  //   const loadMoreBtn = categoriesContainer.find(`.${styles.loadMoreBtn}`)
  //   const divisionCount = Math.floor(homepageCategories.length / 9)
  //   for (let i = 0; i <= divisionCount + 1; i++) {
  //     act(() => {
  //       loadMoreBtn.simulate('click')
  //       jest.runAllTimers()
  //     })
  //   }
  //   wrapper.update()
  //   const expectedText = `Total of ${homepageCategories.length} categories loaded.`
  //   expect(categoriesContainer.find(`.${styles.postCategoryAction}`)).toHaveLength(1)
  //   expect(categoriesContainer.find(`.${styles.postCategoryAction}`).text()).toEqual(expectedText)
  //   wrapper.unmount()
  // })

  // it('displays loading spinner when load more button is clicked', () => {
  //   const wrapper = mount(<MemoryRouter initialEntries={['/']}><CategoriesContainer homepageCategories={homepageCategories} /></MemoryRouter>)
  //   const categoriesContainer = wrapper.find('CategoriesContainer')
  //   const loadMoreBtn = categoriesContainer.find(`.${styles.loadMoreBtn}`)
  //   expect(categoriesContainer.find(`.${styles.postCategoryAction}`).text()).toEqual('Load more...')
  //   act(() => {
  //     loadMoreBtn.simulate('click')
  //     jest.advanceTimersByTime(100)
  //     wrapper.update()
  //   })
  //   expect(categoriesContainer.find(`.${styles.postCategoryAction}`).text()).toEqual('')
  //   act(() => {
  //     jest.advanceTimersByTime(1500)
  //     wrapper.update()
  //   })
  //   expect(categoriesContainer.find(`.${styles.postCategoryAction}`).text()).toEqual('Load more...')
  //   wrapper.unmount()
  // })

  it('display no categories text when there are no categories to show', () => {
    const wrapper = mount(<MemoryRouter initialEntries={['/']}><CategoriesContainer homepageCategories={[]} /></MemoryRouter>)
    const categoriesContainer = wrapper.find('CategoriesContainer')
    expect(categoriesContainer.find(`.${styles.postCategoryAction}`).text()).toEqual('No categories to load')
    wrapper.unmount()
  })

  describe('renders unique links to each category', () => {
    const history = createMemoryHistory()
    const wrapper = mount(
      <Router history={history} initialEntries={['/']}>
        <CategoriesContainer homepageCategories={homepageCategories} />
      </Router>
    )
    const categoriesContainer = wrapper.find('CategoriesContainer')
    homepageCategories.filter((e,i) => i >= 0 && i <= homepageCategories.length)
      .map((props, idx) => {
        it(`${idx}. navigates to the correct URI: ${props.uri}`, () => {
          const categoryComponent = categoriesContainer.find('CategoriesComponent').at(idx)
          categoryComponent.simulate('click')
          expect(history.location.pathname).toEqual(props.uri)
        })
      })
    wrapper.unmount()
  })
})
Example #29
Source File: group-details.test.js    From what-front with MIT License 4 votes vote down vote up
describe('Render of GroupDetails', () => {
  let studentGroupSelector;
  let mentorsSelector;
  let coursesSelector;
  let studentsSelector;
  let historyMock;
  let id;

  beforeEach(() => {
    studentGroupSelector = groupDetailsMock.studentGroupData;
    mentorsSelector = groupDetailsMock.mentorsData;
    coursesSelector = groupDetailsMock.coursesData;
    studentsSelector = groupDetailsMock.studentsData;
    id = groupDetailsMock.id;

    historyMock = { push: jest.fn(), location: {}, listen: jest.fn(), createHref: jest.fn() };
    commonHelpers.transformDateTime = jest.fn().mockReturnValue({ formInitialValue: '2022-06-16' });

    useSelector
      .mockReturnValueOnce(studentGroupSelector)
      .mockReturnValueOnce(mentorsSelector)
      .mockReturnValueOnce(coursesSelector)
      .mockReturnValueOnce(studentsSelector);
  });
  
  afterEach(cleanup);

  it('Should the component be rendered.', () => {

    const { container } = render(
      <Router history={historyMock}>
        <GroupDetails id={id}
                      studentGroupData={studentGroupSelector}
                      studentsData={studentsSelector}
                      mentorsData={mentorsSelector}
                      coursesData={coursesSelector} />
      </Router>
    );

    const groupDetailsContainer = container.getElementsByClassName('container');

    expect(groupDetailsContainer).toMatchSnapshot();
  });

  it('should loader appear when data is false', () => {
    studentGroupSelector = {
      data: groupDetailsMock.studentGroupData.data,
      isLoading: true,
      isLoaded: false,
      error: ''
    };

    useSelector.mockReturnValue(studentGroupSelector);

    const { container } = render(
      <Router history={historyMock}>
        <GroupDetails id={id}
          studentGroupData={studentGroupSelector}
          studentsData={studentsSelector}
          mentorsData={mentorsSelector}
          coursesData={coursesSelector} />
      </Router>);

    const loader = container.querySelector('.spinner-border');
    expect(loader).toBeInTheDocument();
  });

  it('should the h2 element contain "Group: Soft Skills for Lecturers - 2021/2"', () => {
    const { container } = render(
      <Router history={historyMock}>
        <GroupDetails id={id}
          studentGroupData={studentGroupSelector}
          studentsData={studentsSelector}
          mentorsData={mentorsSelector}
          coursesData={coursesSelector} />
      </Router>);

    const header = container.querySelector('h2');
    expect(header.innerHTML).toBe('Group: Soft Skills for Lecturers - 2021/2');
  });

  it('should the table content match', () => {
    const { container } = render(
      <Router history={historyMock}>
        <GroupDetails id={id}
          studentGroupData={studentGroupSelector}
          studentsData={studentsSelector}
          mentorsData={mentorsSelector}
          coursesData={coursesSelector} />
      </Router>);

    const table = container.querySelector('tbody');
    expect(table.innerHTML).toBe('<tr><td>1</td><td>Richard Thomas</td><td>[email protected]</td></tr><tr><td>2</td><td>Joseph Evans</td><td>[email protected]</td></tr><tr><td>3</td><td>Thomas Roberts</td><td>[email protected]</td></tr><tr><td>4</td><td>Barbara Harris</td><td>[email protected]</td></tr><tr><td>5</td><td>Susan Clark</td><td>[email protected]</td></tr><tr><td>6</td><td>Jessica Cooper</td><td>[email protected]</td></tr>');
  });

  it('should url change to "/students/2"', () => {
    const { container } = render(
      <Router history={historyMock}>
        <GroupDetails id={id}
          studentGroupData={studentGroupSelector}
          studentsData={studentsSelector}
          mentorsData={mentorsSelector}
          coursesData={coursesSelector} />
      </Router>);


    userEvent.click(screen.getByText('Richard Thomas'));
    window.history.pushState({}, 'Richard Thomas page', '/students/2');
    expect(global.window.location.pathname).toEqual('/students/2');
  });

  it('Should redirect to 404 page in case of error in course details data.', () => {
    const history = createMemoryHistory();

    useSelector.mockReturnValue({
      ...studentGroupSelector,
      error: 'Something went wrong',
      loaded: false,
    });

    render(
      <Router history={history}>
         <GroupDetails id={id}
          studentGroupData={studentGroupSelector}
          studentsData={studentsSelector}
          mentorsData={mentorsSelector}
          coursesData={coursesSelector} />
      </Router>
    );

    history.push(paths.NOT_FOUND);
    expect(history.location.pathname).toBe(paths.NOT_FOUND);
  });

});