Skip to content

Commit 79674f0

Browse files
committed
chore: add unit tests for all utility functions
1 parent 72e1791 commit 79674f0

File tree

12 files changed

+589
-9
lines changed

12 files changed

+589
-9
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,13 @@ jobs:
3636
key: ${{ runner.os }}-eslint-${{ hashFiles('**/pnpm-lock.yaml', '**/eslint.config.mjs') }}
3737

3838
- name: Lint
39-
run: pnpm run lint
39+
run: pnpm lint
4040

4141
- name: Build
42-
run: pnpm run build
42+
run: pnpm build
43+
44+
- name: Test
45+
run: pnpm test
4346

4447
- name: Upload artifact
4548
if: success()

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616
"build": "vue-tsc --noEmit && vite build",
1717
"preview": "vite preview",
1818
"lint": "eslint 'src/**/*.{js,ts,vue}' --cache",
19-
"lint:fix": "pnpm run lint --fix",
20-
"test:ci": "pnpm run lint:fix && pnpm run build"
19+
"lint:fix": "pnpm lint --fix",
20+
"test": "vitest run",
21+
"test:watch": "vitest",
22+
"test:ci": "pnpm lint:fix && pnpm build && pnpm test"
2123
},
2224
"dependencies": {
2325
"@popperjs/core": "2.11.8",
@@ -56,6 +58,7 @@
5658
"vite-plugin-optimize-css-modules": "1.2.0",
5759
"vite-plugin-pwa": "0.21.1",
5860
"vite-tsconfig-paths": "5.1.4",
61+
"vitest": "3.0.6",
5962
"vue-tsc": "2.2.0",
6063
"workbox-build": "7.3.0",
6164
"workbox-window": "7.3.0"

0 commit comments

Comments
 (0)