Skip to content

Commit 68e52b2

Browse files
committed
feat: Introduce Vitest for testing and add new tests for schema, completer, and formatter
lint workflow becomes ci workflow running tests as well
1 parent cc0fa6f commit 68e52b2

File tree

8 files changed

+1271
-5
lines changed

8 files changed

+1271
-5
lines changed
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Lint
1+
name: CI
22

33
on:
44
push:
@@ -7,7 +7,7 @@ on:
77
branches: [main, master]
88

99
jobs:
10-
lint:
10+
ci:
1111
runs-on: ubuntu-latest
1212

1313
steps:
@@ -30,3 +30,6 @@ jobs:
3030

3131
- name: Run lint
3232
run: pnpm lint
33+
34+
- name: Run tests
35+
run: pnpm vitest run

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@
4343
"fixall": "pnpm fixstyle && pnpm fixsrc",
4444
"fixsrc": "eslint '**/*.{ts,tsx,js,jsx}' --ignore-pattern '**/eslint.config.js' --fix",
4545
"fixstyle": "prettier '**/*.{ts,tsx,js,jsx,json,md,yaml,yml}' --write",
46+
"test": "vitest",
47+
"test:watch": "vitest --watch",
48+
"test:ui": "vitest --ui",
4649
"prepare": "husky",
4750
"prepublishOnly": "pnpm build"
4851
},
@@ -85,6 +88,7 @@
8588
"prettier": "^3.7.3",
8689
"ts-node": "^10.9.1",
8790
"typescript": "^5.9.3",
88-
"typescript-eslint": "^8.48.0"
91+
"typescript-eslint": "^8.48.0",
92+
"vitest": "^4.0.18"
8993
}
9094
}

0 commit comments

Comments
 (0)