Skip to content

Commit 7fefe3a

Browse files
committed
add unit test using vitest
1 parent 2a1a31b commit 7fefe3a

File tree

6 files changed

+712
-8
lines changed

6 files changed

+712
-8
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,16 @@ jobs:
3333
cache: pnpm
3434
- run: pnpm install
3535
- run: pnpm run typecheck
36+
test:
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v4
40+
- uses: pnpm/action-setup@v4
41+
with:
42+
version: latest
43+
- uses: actions/setup-node@v4
44+
with:
45+
node-version: latest
46+
cache: pnpm
47+
- run: pnpm install
48+
- run: pnpm run test

package.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
"author": "mehm8128",
1010
"license": "MIT",
1111
"description": "queryByRole for browser.",
12-
"files": ["dist", "package.json"],
12+
"files": [
13+
"dist",
14+
"package.json"
15+
],
1316
"exports": {
1417
".": {
1518
"types": "./dist/index.d.ts",
@@ -24,14 +27,17 @@
2427
"build": "tsup ./src",
2528
"typecheck": "tsgo --noEmit src",
2629
"biome": "biome check --write src",
27-
"biome:ci": "biome ci src"
30+
"biome:ci": "biome ci src",
31+
"test": "vitest run"
2832
},
2933
"devDependencies": {
3034
"@biomejs/biome": "1.9.4",
3135
"@types/aria-query": "^5.0.4",
3236
"@types/node": "^22.15.29",
3337
"@typescript/native-preview": "7.0.0-dev.20250531.1",
34-
"tsup": "^8.5.0"
38+
"jsdom": "^26.1.0",
39+
"tsup": "^8.5.0",
40+
"vitest": "^3.1.4"
3541
},
3642
"dependencies": {
3743
"aria-query": "^5.3.2",

0 commit comments

Comments
 (0)