From bafe29086aef0f3cc8971a19988e078022749f76 Mon Sep 17 00:00:00 2001 From: Arthur Belleville Date: Fri, 10 Oct 2025 10:23:30 +0200 Subject: [PATCH] Test setup --- .pre-commit-config.yaml | 19 +++++++++++++------ api/src/helpers.ts | 1 + justfile | 3 +++ 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bf4e4c2..76ae768 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,15 +7,22 @@ repos: language: system pass_filenames: false always_run: true - - id: test-ui - name: Test Frontend - entry: just test-frontend - language: python - pass_filenames: false - files: ^ui/.*\.(ts|tsx|js|jsx)$ - id: typecheck name: Typecheck Frontend entry: just typecheck language: python pass_filenames: false files: \.ts* + - id: test-ui + name: Test Frontend + entry: just test-frontend + language: python + pass_filenames: false + files: ^ui/.*\.(ts|tsx|js|jsx)$ + - id: test-api + name: Test API + entry: just test-api + language: python + pass_filenames: false + files: ^api/.*\.(ts)$ + diff --git a/api/src/helpers.ts b/api/src/helpers.ts index 2b21900..cd0f596 100644 --- a/api/src/helpers.ts +++ b/api/src/helpers.ts @@ -69,6 +69,7 @@ export const generateICSFromEvents = ( }); icsContent += "\r\n" + "END:VCALENDAR"; + return icsContent; }; diff --git a/justfile b/justfile index 737a9b5..d3bf68a 100644 --- a/justfile +++ b/justfile @@ -16,6 +16,9 @@ build-frontend: _api-dev: cd api && npm run dev +test-api: + cd api && npm run test + dev: just _api-dev & (just _frontend-dev)