From 514633c15d3ba2eb859c412b181f776b4f391e1d Mon Sep 17 00:00:00 2001 From: droguljic <1875821+droguljic@users.noreply.github.com> Date: Tue, 2 Jun 2026 13:01:22 +0200 Subject: [PATCH] fix: exclude test files from the build The `*.test.ts` file are now explicitly excluded from the build. Previously the unit test were included in the build as they were placed alongside source files in at the `src`. Add the dedicated `test:unit` command to run unit tests and as ensure build-time validation on the test files. --- package.json | 1 + src/tsconfig.json | 1 + 2 files changed, 2 insertions(+) diff --git a/package.json b/package.json index 57361b6a..bb389194 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "release": "release-it --only-version", "test": "tsx --tsconfig tests/tsconfig.json tests/run.ts", "test:build": "npm run build && tstyche build", + "test:unit": "tsx --test src/**/*.test.ts", "prepare": "husky" }, "prettier": "@studion/prettier-config", diff --git a/src/tsconfig.json b/src/tsconfig.json index e00cd137..99c7f030 100644 --- a/src/tsconfig.json +++ b/src/tsconfig.json @@ -2,6 +2,7 @@ "extends": "../tsconfig.options.json", "files": [], "include": ["**/*"], + "exclude": ["**/*.test.ts"], "references": [], "compilerOptions": { "rootDir": ".",