From 708af05ab25914493328f6b8443925a08b90c337 Mon Sep 17 00:00:00 2001 From: Donkie Date: Sun, 2 Aug 2026 14:59:38 +0200 Subject: [PATCH] ci: run the client_v2 unit tests The ci hook lints, formats and type checks client_v2 but never ran its unit tests, so everything under src/**/*.test.ts was local only and nothing would have caught a broken one. The backend group already runs pytest here, so this is just the missing counterpart. The browser suite in tests_frontend_v2/ is unaffected, it covers different ground and runs in its own job. Adds about 4s to the style job, which already installs client_v2 deps. Left out of pre-commit so committing stays fast. Also points the type check comment at the pre-commit copy it meant, rather than at itself. --- lefthook.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lefthook.yml b/lefthook.yml index 499f4336..288ea233 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -78,6 +78,12 @@ ci: run: ./node_modules/.bin/prettier --check . - name: Run type check on client_v2 files root: "client_v2/" - # See the ci hook's copy of this job for why paraglide runs first. + # See the pre-commit copy of this job for why paraglide runs first. run: npm run paraglide && ./node_modules/.bin/svelte-kit sync && ./node_modules/.bin/svelte-check --tsconfig ./tsconfig.json + - name: Run unit tests on client_v2 files + root: "client_v2/" + # Mirrors the backend's pytest job above. Kept to the ci hook only, so + # committing stays fast; these are pure unit tests over src/**/*.test.ts, + # not the browser suite in tests_frontend_v2/. + run: ./node_modules/.bin/vitest run