Spaces:
Running
Running
James McCool
commited on
Commit
·
cd686b8
1
Parent(s):
d6d128b
readded essential files
Browse files- package.json +4 -2
- src/App.test.js +8 -0
package.json
CHANGED
|
@@ -10,11 +10,13 @@
|
|
| 10 |
},
|
| 11 |
"scripts": {
|
| 12 |
"start": "react-scripts start",
|
| 13 |
-
"build": "react-scripts build"
|
|
|
|
| 14 |
},
|
| 15 |
"eslintConfig": {
|
| 16 |
"extends": [
|
| 17 |
-
"react-app"
|
|
|
|
| 18 |
]
|
| 19 |
},
|
| 20 |
"browserslist": {
|
|
|
|
| 10 |
},
|
| 11 |
"scripts": {
|
| 12 |
"start": "react-scripts start",
|
| 13 |
+
"build": "react-scripts build",
|
| 14 |
+
"test": "react-scripts test"
|
| 15 |
},
|
| 16 |
"eslintConfig": {
|
| 17 |
"extends": [
|
| 18 |
+
"react-app",
|
| 19 |
+
"react-app/jest"
|
| 20 |
]
|
| 21 |
},
|
| 22 |
"browserslist": {
|
src/App.test.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { render, screen } from '@testing-library/react';
|
| 2 |
+
import App from './App';
|
| 3 |
+
|
| 4 |
+
test('renders learn react link', () => {
|
| 5 |
+
render(<App />);
|
| 6 |
+
const linkElement = screen.getByText(/learn react/i);
|
| 7 |
+
expect(linkElement).toBeInTheDocument();
|
| 8 |
+
});
|