Add test component; Run prettier

This commit is contained in:
Manuel Prodinger
2022-03-23 10:50:48 +01:00
parent 78a505eb44
commit aa9c894de1
7 changed files with 25 additions and 23 deletions
+1 -1
View File
@@ -3,4 +3,4 @@ module.exports = {
tailwindcss: {},
autoprefixer: {},
},
}
};
+4 -7
View File
@@ -1,4 +1,5 @@
import logo from './logo.svg';
import logo from "./logo.svg";
import Test from "./Components/test";
function App() {
return (
@@ -7,13 +8,9 @@ function App() {
<img src={logo} className="App-logo" alt="logo" />
<p className="underline hover:text-blue-500">
Edit <code>src/App.js</code> and save to reload.
<Test />
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
<a className="App-link" href="https://reactjs.org" target="_blank" rel="noopener noreferrer">
Learn React
</a>
</header>
+3 -3
View File
@@ -1,7 +1,7 @@
import { render, screen } from '@testing-library/react';
import App from './App';
import { render, screen } from "@testing-library/react";
import App from "./App";
test('renders learn react link', () => {
test("renders learn react link", () => {
render(<App />);
const linkElement = screen.getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
+7
View File
@@ -0,0 +1,7 @@
import React from "react";
function test() {
return <p className="bg-green-800 rounded-lg"> test </p>;
}
export default test;
+6 -6
View File
@@ -1,14 +1,14 @@
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import React from "react";
import ReactDOM from "react-dom";
import "./index.css";
import App from "./App";
import reportWebVitals from "./reportWebVitals";
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
document.getElementById("root")
);
// If you want to start measuring performance in your app, pass a function
+2 -2
View File
@@ -1,6 +1,6 @@
const reportWebVitals = onPerfEntry => {
const reportWebVitals = (onPerfEntry) => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
import("web-vitals").then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry);
getFID(onPerfEntry);
getFCP(onPerfEntry);
+2 -4
View File
@@ -1,9 +1,7 @@
module.exports = {
content: [
"./src/**/*.{js,jsx,ts,tsx}",
],
content: ["./src/**/*.{js,jsx,ts,tsx}"],
theme: {
extend: {},
},
plugins: [],
}
};