Skip to content

Commit 79ba158

Browse files
authored
test(frontend): add unit testing with Vitest and CI integration (#35)
* Initialized Vitest and added first test for frontend * Updated GitHub CI to run frontend unit tests * Added test for useEnhancedToast composable * Updated CI Node version to 24
1 parent a410e67 commit 79ba158

8 files changed

Lines changed: 3266 additions & 1161 deletions

File tree

.github/workflows/frontend.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Set up Node.js
2525
uses: actions/setup-node@v4
2626
with:
27-
node-version: '21'
27+
node-version: '24'
2828
cache: 'npm'
2929
cache-dependency-path: frontend/package-lock.json
3030

@@ -36,3 +36,28 @@ jobs:
3636

3737
- name: Run ESLint
3838
run: npm run lint
39+
40+
test:
41+
name: Run Unit Tests
42+
runs-on: ubuntu-latest
43+
44+
defaults:
45+
run:
46+
working-directory: ./frontend
47+
48+
steps:
49+
- name: Checkout code
50+
uses: actions/checkout@v4
51+
52+
- name: Set up Node.js
53+
uses: actions/setup-node@v4
54+
with:
55+
node-version: '24'
56+
cache: 'npm'
57+
cache-dependency-path: frontend/package-lock.json
58+
59+
- name: Install dependencies
60+
run: npm ci
61+
62+
- name: Run Vitest
63+
run: npm run test:unit

0 commit comments

Comments
 (0)