From 8b65e1ecfd608fc998a0ec8bf51dd1b24db7d8c0 Mon Sep 17 00:00:00 2001 From: stroblme Date: Sun, 30 Aug 2026 17:19:20 +0200 Subject: [PATCH] Give the frontend's check scripts something that runs them MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Eight `*.check.ts` scripts existed and nothing ran any of them, so a helper's arithmetic was only checked by hand. `make test-checks` runs every one and `make test` now includes it — they need no stack, so they sit between the backend suite and Playwright. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01KYM38KSb4V4v2T71eifnZv --- Makefile | 10 ++++++++-- frontend/package.json | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index dcdeb5a..035710a 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # The workspace root delegates to these (see ../Makefile). .PHONY: dev-utils dev dev-local dev-lan rebuild-frontend up down update install dev-backend dev-frontend \ - generate-client sync-example test test-backend test-frontend soak bench-startup lint lint-backend \ + generate-client sync-example test test-backend test-checks test-frontend soak bench-startup lint lint-backend \ lint-frontend format-frontend umami build docs docs-serve clean help COMPOSE_ROOT := $(CURDIR) @@ -143,7 +143,13 @@ sync-example: ## Upload `examples/myresearch` the way a data scientist would # ── Testing ─────────────────────────────────────────────────────── -test: test-backend test-frontend ## Run all tests (backend + frontend) +test: test-backend test-checks test-frontend ## Run all tests (backend + checks + frontend) + +# The frontend has no unit-test runner, so a pure helper is checked by a +# `*.check.ts` script of plain `node:assert` that runs itself and needs no +# stack. This is the target that runs every one of them. +test-checks: ## Run the frontend's *.check.ts scripts + cd frontend && bun run check test-backend: ## Run backend tests (pytest + coverage) # Its own SQLite file in a temp directory (tests/__init__.py), so this needs diff --git a/frontend/package.json b/frontend/package.json index 3183d2b..2bba2fe 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -12,7 +12,8 @@ "preview": "vite preview", "generate-client": "openapi-ts", "test": "bunx playwright test", - "test:ui": "bunx playwright test --ui" + "test:ui": "bunx playwright test --ui", + "check": "for f in $(find src -name '*.check.ts' | sort); do echo \" → $f\"; bun run \"$f\" || exit 1; done" }, "dependencies": { "@hookform/resolvers": "^5.2.2",