Skip to content

Commit

Permalink
I-41 Fix test error with navigate
Browse files Browse the repository at this point in the history
  • Loading branch information
hhpr98 committed Oct 28, 2023
1 parent 1268931 commit 103b88d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/App.test.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import React from 'react';

import { render, screen } from '@testing-library/react';
import { BrowserRouter as Router } from "react-router-dom";

import App from './App';

// https://github.com/facebook/jest/issues/9538
// eslint-disable-next-line no-undef
test('renders app test', () => {
// eslint-disable-next-line react/jsx-filename-extension
render(<App />);
render(<Router><App /></Router>);
const text = screen.getByText(/(Hành trình ca tôi)/i);
expect(text).toBeInTheDocument();
});
1 change: 0 additions & 1 deletion src/components/Places/Places.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from "react";

import { useNavigate } from "react-router-dom";


// eslint-disable-next-line max-len
const defaultURL = "https://cdn.tgdd.vn/Files/2022/10/01/1473455/kham-pha-lang-chay-gio-son-hai-ninh-thuan-dubai-thu-nho-cua-viet-nam-202210020925136207.jpg";

Expand Down

0 comments on commit 103b88d

Please sign in to comment.