Skip to content

Commit 3c80424

Browse files
author
oleksandr_taruraiev
committed
Align tests
1 parent d990fe1 commit 3c80424

File tree

2 files changed

+24
-14
lines changed

2 files changed

+24
-14
lines changed

package.json

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,37 @@
11
{
22
"name": "hello-world",
33
"version": "0.1.0",
4+
"private": true,
45
"packageManager": "pnpm@8.15.0",
56
"engines": {
67
"node": ">=18.0.0",
78
"pnpm": ">=8.0.0"
89
},
910
"dependencies": {
10-
"flow-bin": "^0.188.1",
11-
"react": "^18.2.0",
12-
"react-dom": "^18.2.0",
13-
"react-scripts": "5.0.1",
14-
"y18n": "^5.0.8"
11+
"react": "^18.3.1",
12+
"react-dom": "^18.3.1",
13+
"react-scripts": "5.0.1"
14+
},
15+
"devDependencies": {
16+
"flow-bin": "^0.188.2"
1517
},
1618
"scripts": {
1719
"start": "react-scripts start",
18-
"build:clean": "react-scripts build",
20+
"build": "react-scripts build",
1921
"build:prod": "react-scripts build",
22+
"test": "react-scripts test",
2023
"test:coverage": "CI=true react-scripts test --coverage --watchAll=false --testPathIgnorePatterns=node_modules",
21-
"prepare:artifacts": "pnpm run build:prod",
22-
"prepare:validate": "pnpm run test:coverage && pnpm run flow:check",
2324
"eject": "react-scripts eject",
24-
"install-types": "echo Mock stage install-types",
25-
"flow:check": "node node_modules/flow-bin/cli.js check"
25+
"flow": "flow",
26+
"flow:check": "pnpm exec flow check",
27+
"prepare:artifacts": "pnpm run build:prod",
28+
"prepare:validate": "pnpm run test:coverage"
29+
},
30+
"eslintConfig": {
31+
"extends": [
32+
"react-app",
33+
"react-app/jest"
34+
]
2635
},
2736
"browserslist": {
2837
"production": [

src/App.test.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import React from 'react';
2-
import ReactDOM from 'react-dom';
2+
import { createRoot } from 'react-dom/client';
33
import App from './App';
44

55
it('renders without crashing', () => {
66
const div = document.createElement('div');
7-
ReactDOM.render(<App />, div);
8-
ReactDOM.unmountComponentAtNode(div);
9-
});
7+
const root = createRoot(div);
8+
root.render(<App />);
9+
root.unmount();
10+
});

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy