Fixed tests

This commit is contained in:
Rishabh 2022-07-04 15:57:19 +02:00
parent ac43c86c2e
commit 76bc1a8c07
3 changed files with 8 additions and 21 deletions

View File

@ -2,11 +2,11 @@ import React from 'react';
import './App.css';
function App() {
return (
<div className="App">
return (
<div className="App">
Sodo Search
</div>
);
</div>
);
}
export default App;

View File

@ -1,9 +1,9 @@
import { render, screen } from '@testing-library/react';
import {render, screen} from '@testing-library/react';
import App from './App';
import React from 'react';
test('renders learn react link', () => {
render(<App />);
const linkElement = screen.getByText(/Sodo Search/i);
expect(linkElement).toBeInTheDocument();
render(<App />);
const linkElement = screen.getByText(/Sodo Search/i);
expect(linkElement).toBeInTheDocument();
});

View File

@ -1,13 +0,0 @@
const reportWebVitals = onPerfEntry => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry);
getFID(onPerfEntry);
getFCP(onPerfEntry);
getLCP(onPerfEntry);
getTTFB(onPerfEntry);
});
}
};
export default reportWebVitals;