Skip to content

Commit a741ee5

Browse files
alexeyr-cialexeyr
andauthored
Update CONTRIBUTING and testing dependencies (#1675)
Co-authored-by: Alexey Romanov <[email protected]>
1 parent c050f59 commit a741ee5

File tree

3 files changed

+82
-180
lines changed

3 files changed

+82
-180
lines changed

CONTRIBUTING.md

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,14 @@
66

77
## To run tests:
88
* [Yalc](https://github.com/whitecolor/yalc) must be installed globally for most local development.
9-
* After updating code via git, to prepare all examples and run all tests:
10-
9+
* After updating code via Git, to prepare all examples:
1110
```sh
1211
cd react_on_rails/
1312
bundle && yarn && rake examples:gen_all && rake node_package && rake
1413
```
1514

16-
In order to run tests in browser
17-
```
18-
yarn global add browserify babelify tape-run faucet
19-
browserify -t babelify node_package/tests/*.js | tape-run | faucet
20-
```
21-
22-
See Dev Initial Setup, below for, well... initial setup.
15+
See [Dev Initial Setup](#dev-initial-setup) below for, well... initial setup,
16+
and [Running tests](#running-tests) for more details on running tests.
2317

2418
# IDE/IDE SETUP
2519
It's critical to configure your IDE/editor to ignore certain directories. Otherwise your IDE might slow to a crawl!
@@ -153,21 +147,23 @@ script/convert
153147
yarn run dummy:spec
154148
```
155149

156-
### Run NPM JS tests
150+
## Running tests
151+
152+
### JS tests
157153

158154
```sh
159155
cd react_on_rails/
160-
yarn test
156+
yarn run test
161157
```
162158

163-
### Run spec/dummy tests
159+
### spec/dummy tests
164160

165161
```sh
166162
cd react_on_rails/spec/dummy
167163
rspec
168164
```
169165

170-
### Run most tests and linting
166+
### Linting, type checking and JS tests together
171167

172168
```sh
173169
cd react_on_rails/

package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@
1919
"@babel/preset-env": "^7.20.2",
2020
"@babel/preset-react": "^7.18.6",
2121
"@babel/types": "^7.20.7",
22-
"@types/jest": "^29.0.0",
22+
"@types/jest": "^29.5.14",
2323
"@types/react": "^18.2.0",
2424
"@types/react-dom": "^18.2.0",
2525
"@types/turbolinks": "^5.2.2",
2626
"@types/webpack-env": "^1.18.4",
2727
"@typescript-eslint/eslint-plugin": "^6.18.1",
2828
"@typescript-eslint/parser": "^6.18.1",
29-
"babelify": "^10.0.0",
30-
"blue-tape": "^1.0.0",
3129
"concurrently": "^8.2.2",
3230
"create-react-class": "^15.7.0",
3331
"eslint": "^7.32.0",
@@ -37,8 +35,8 @@
3735
"eslint-plugin-jsx-a11y": "^6.8.0",
3836
"eslint-plugin-prettier": "^3.4.1",
3937
"eslint-plugin-react": "^7.33.2",
40-
"jest": "^29.0.0",
41-
"jest-environment-jsdom": "^29.0.0",
38+
"jest": "^29.7.0",
39+
"jest-environment-jsdom": "^29.7.0",
4240
"jsdom": "^22.1.0",
4341
"nps": "^5.9.3",
4442
"prettier": "^2.8.8",
@@ -48,7 +46,7 @@
4846
"react-dom": "18.3.0-canary-670811593-20240322",
4947
"react-transform-hmr": "^1.0.4",
5048
"redux": "^4.2.1",
51-
"ts-jest": "^29.1.0",
49+
"ts-jest": "^29.2.5",
5250
"typescript": "^5.6.2"
5351
},
5452
"dependencies": {

0 commit comments

Comments
 (0)