diff options
author | 2022-02-24 19:25:03 -0800 | |
---|---|---|
committer | 2022-02-24 19:25:03 -0800 | |
commit | 896195f5e377beb68fe743f0eb75d023e16703aa (patch) | |
tree | e4943fb662231766796c70dae67ba86f2a269e3e /examples/react/src | |
parent | 23596b48ca03a74c7555ada3fe1f184d29b777a8 (diff) | |
download | bun-896195f5e377beb68fe743f0eb75d023e16703aa.tar.gz bun-896195f5e377beb68fe743f0eb75d023e16703aa.tar.zst bun-896195f5e377beb68fe743f0eb75d023e16703aa.zip |
slightly clean up react example
Diffstat (limited to 'examples/react/src')
-rw-r--r-- | examples/react/src/App.test.js | 8 | ||||
-rw-r--r-- | examples/react/src/index.jsx | 6 | ||||
-rw-r--r-- | examples/react/src/reportWebVitals.js | 13 | ||||
-rw-r--r-- | examples/react/src/setupTests.js | 5 |
4 files changed, 0 insertions, 32 deletions
diff --git a/examples/react/src/App.test.js b/examples/react/src/App.test.js deleted file mode 100644 index 1f03afeec..000000000 --- a/examples/react/src/App.test.js +++ /dev/null @@ -1,8 +0,0 @@ -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(); -}); diff --git a/examples/react/src/index.jsx b/examples/react/src/index.jsx index 26419cdcb..1d316ddf0 100644 --- a/examples/react/src/index.jsx +++ b/examples/react/src/index.jsx @@ -2,7 +2,6 @@ import * as React from "react"; import ReactDOM from "react-dom"; import "./index.css"; import App from "./App"; -import reportWebVitals from "./reportWebVitals"; ReactDOM.render( <React.StrictMode> @@ -10,8 +9,3 @@ ReactDOM.render( </React.StrictMode>, document.getElementById("root") ); - -// If you want to start measuring performance in your app, pass a function -// to log results (for example: reportWebVitals(console.log)) -// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals -reportWebVitals(); diff --git a/examples/react/src/reportWebVitals.js b/examples/react/src/reportWebVitals.js deleted file mode 100644 index 5253d3ad9..000000000 --- a/examples/react/src/reportWebVitals.js +++ /dev/null @@ -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; diff --git a/examples/react/src/setupTests.js b/examples/react/src/setupTests.js deleted file mode 100644 index 8f2609b7b..000000000 --- a/examples/react/src/setupTests.js +++ /dev/null @@ -1,5 +0,0 @@ -// jest-dom adds custom jest matchers for asserting on DOM nodes. -// allows you to do things like: -// expect(element).toHaveTextContent(/react/i) -// learn more: https://github.com/testing-library/jest-dom -import '@testing-library/jest-dom'; |