mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-27 00:52:36 +03:00
Fixed tests
This commit is contained in:
parent
a47dc6b7c2
commit
c71db17200
@ -22,7 +22,7 @@
|
||||
"build:combined": "node ./scripts/build-combined.js",
|
||||
"build:bundle": "webpack --config webpack.config.js",
|
||||
"test:ui": "react-scripts test",
|
||||
"test": "yarn test --watchAll=false --coverage",
|
||||
"test": "yarn test:ui --watchAll=false --coverage",
|
||||
"eject": "react-scripts eject",
|
||||
"lint": "eslint src --ext .js --cache",
|
||||
"preship": "yarn lint",
|
||||
|
@ -1,11 +1,11 @@
|
||||
import './App.css';
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<div className="App">
|
||||
Hello world
|
||||
</div>
|
||||
);
|
||||
return (
|
||||
<div className="App">
|
||||
Hello world
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
|
@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react';
|
||||
import App from './App';
|
||||
|
||||
test('renders learn react link', () => {
|
||||
render(<App />);
|
||||
const linkElement = screen.getByText(/learn react/i);
|
||||
expect(linkElement).toBeInTheDocument();
|
||||
render(<App />);
|
||||
const linkElement = screen.getByText(/hello world/i);
|
||||
expect(linkElement).toBeInTheDocument();
|
||||
});
|
||||
|
@ -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;
|
Loading…
Reference in New Issue
Block a user