🔧(frontend) give vitest its own config and a make target

A separate vitest.config.ts keeps the tests off the build
plugins and the mediapipe version check in vite.config.ts.
make test now runs the frontend tests after the backend ones,
and test-front runs on Node 24, the current LTS.
This commit is contained in:
davd-gzl
2026-10-03 01:17:04 +09:00
committed by lebaudantoine
parent f4217b5b9b
commit f0d5d652d1
4 changed files with 16 additions and 3 deletions
+1 -1
View File
@@ -207,7 +207,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
with:
node-version: "22"
node-version: "24"
- name: Install dependencies
run: cd src/frontend/ && npm ci --ignore-scripts
+6 -1
View File
@@ -212,6 +212,10 @@ frontend-format: ## run the frontend format
cd $(PATH_FRONT) && npm run format
.PHONY: frontend-format
frontend-test: ## run the frontend unit tests
cd $(PATH_FRONT) && npm test
.PHONY: frontend-test
run-frontend-development: ## run the frontend in development mode
@$(COMPOSE) stop frontend
cd $(PATH_FRONT) && npm run dev
@@ -260,7 +264,8 @@ lint-pylint: ## lint back-end python sources with pylint only on changed files f
test: ## run project tests; pass extra pytest args via ARGS, e.g. `make test ARGS="-vv"`
@args="$(ARGS) $(filter-out $@,$(MAKECMDGOALS))" && \
$(MAKE) test-back-parallel ARGS="$${args}" && \
$(MAKE) test-summary ARGS="$${args}"
$(MAKE) test-summary ARGS="$${args}" && \
$(MAKE) frontend-test
.PHONY: test
test-back: ## run back-end tests (pass extra pytest args via ARGS)
+1 -1
View File
@@ -10,5 +10,5 @@
"noEmit": true,
"types": ["node"]
},
"include": ["vite.config.ts"]
"include": ["vite.config.ts", "vitest.config.ts"]
}
+8
View File
@@ -0,0 +1,8 @@
import { defineConfig } from 'vitest/config'
// Kept apart from vite.config.ts so the tests load none of the build plugins.
export default defineConfig({
resolve: {
tsconfigPaths: true,
},
})