Skip to content

Commit b7afc1e

Browse files
committed
chore: add tests files
1 parent 2b1f373 commit b7afc1e

File tree

13 files changed

+775
-1069
lines changed

13 files changed

+775
-1069
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,17 @@ jobs:
4444
run: |
4545
pnpm install --ignore-scripts
4646
pnpm run build
47+
48+
- name: Run Tests
49+
run: |
50+
pnpm run test
51+
pnpm run test:coverage
52+
53+
- name: Upload Coverage Report
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: coverage-report
57+
path: coverage/
4758

4859
- name: Build Demo Project
4960
run: |

package.json

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
"main": "./dist/index.js",
66
"scripts": {
77
"build": "rslib build",
8-
"diff": "npx rsdoctor bundle-diff --html --baseline=examples/rsbuild-demo/dist/.rsdoctor/rsdoctor-data.json --current=examples/rsbuild-demo/dist/.rsdoctor/rsdoctor-data.json"
8+
"diff": "npx rsdoctor bundle-diff --html --baseline=examples/rsbuild-demo/dist/.rsdoctor/rsdoctor-data.json --current=examples/rsbuild-demo/dist/.rsdoctor/rsdoctor-data.json",
9+
"test": "rstest",
10+
"test:watch": "rstest --watch",
11+
"test:coverage": "rstest --coverage",
12+
"test:e2e": "playwright test"
913
},
1014
"files": [
1115
"dist",
@@ -32,14 +36,19 @@
3236
"access": "public"
3337
},
3438
"devDependencies": {
35-
"@rslib/core": "^0.16.0",
36-
"@types/node": "^24.5.2",
37-
"@rsdoctor/cli": "1.3.3-beta.2",
38-
"@rsdoctor/client": "1.3.3-beta.2",
3939
"@actions/artifact": "^2.3.2",
4040
"@actions/core": "^1.2.6",
4141
"@actions/github": "^4.0.0",
42-
"size-plugin-core": "0.0.9",
42+
"@rsdoctor/cli": "1.3.3-beta.2",
43+
"@rsdoctor/client": "1.3.3-beta.2",
44+
"@rslib/core": "^0.16.0",
45+
"@rstest/core": "^0.5.4",
46+
"@types/node": "^24.5.2",
47+
"@types/node-fetch": "^2.6.11",
48+
"@types/yauzl": "^2.10.3",
49+
"@playwright/test": "^1.42.1",
50+
"mock-fs": "^5.2.0",
51+
"nock": "^13.5.4",
4352
"yauzl": "^3.2.0"
4453
},
4554
"overrides": {

0 commit comments

Comments
 (0)