Skip to content

Commit ab81ca3

Browse files
authored
test: migrate to Rstest (#18)
1 parent dd85900 commit ab81ca3

16 files changed

Lines changed: 361 additions & 3989 deletions

.cspell.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"finalhandler",
2626
"hono",
2727
"rspack",
28+
"rstest",
2829
"rstackjs",
2930
"sokra"
3031
],

.github/workflows/nodejs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
package-manager-cache: false
4646

4747
- name: Install dependencies
48-
run: pnpm install --frozen-lockfile
48+
run: pnpm i
4949

5050
- name: Run checks
5151
run: pnpm run lint
@@ -85,7 +85,7 @@ jobs:
8585
package-manager-cache: false
8686

8787
- name: Install dependencies
88-
run: pnpm install --frozen-lockfile
88+
run: pnpm i
8989

9090
- name: Run tests
91-
run: pnpm run test:coverage -- --ci
91+
run: pnpm run test

jest.config.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

package.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,8 @@
3434
"build:types": "tsc --declaration --emitDeclarationOnly --outDir types && prettier \"types/**/*.ts\" --write",
3535
"build:code": "babel src -d dist --copy-files",
3636
"build": "npm-run-all -p \"build:**\"",
37-
"test:only": "jest",
38-
"test:watch": "pnpm run test:only -- --watch",
39-
"test:coverage": "pnpm run test:only -- --collectCoverageFrom=\"src/**/*.js\" --coverage",
40-
"pretest": "pnpm run lint",
41-
"test": "pnpm run test:coverage",
37+
"test:watch": "rstest -w",
38+
"test": "rstest",
4239
"prepare": "pnpm run build"
4340
},
4441
"dependencies": {
@@ -49,20 +46,20 @@
4946
"range-parser": "^1.2.1"
5047
},
5148
"devDependencies": {
52-
"@rspack/core": "2.0.0-beta.5",
5349
"@babel/cli": "^7.16.7",
5450
"@babel/core": "^7.16.7",
5551
"@babel/preset-env": "^7.16.7",
5652
"@fastify/express": "^4.0.2",
5753
"@hapi/hapi": "^21.3.7",
5854
"@hono/node-server": "^1.12.0",
55+
"@rspack/core": "2.0.0-beta.5",
56+
"@rstest/core": "0.9.2",
5957
"@types/connect": "^3.4.35",
6058
"@types/express": "^5.0.2",
6159
"@types/mime-types": "^3.0.1",
6260
"@types/node": "^22.3.0",
6361
"@types/on-finished": "^2.3.4",
6462
"@types/range-parser": "^1.2.7",
65-
"babel-jest": "^30.1.2",
6663
"connect": "^3.7.0",
6764
"cspell": "^9.6.2",
6865
"deepmerge": "^4.2.2",
@@ -74,7 +71,6 @@
7471
"file-loader": "^6.2.0",
7572
"finalhandler": "^2.1.0",
7673
"hono": "^4.4.13",
77-
"jest": "^30.1.3",
7874
"koa": "^3.0.0",
7975
"npm-run-all": "^4.1.5",
8076
"prettier": "^3.6.0",

0 commit comments

Comments
 (0)