From 24a3880aad6a6b203b8c662738ca81603a137d7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Fri, 4 Sep 2026 17:47:30 +0200 Subject: [PATCH] :bug: Fix test scripts: Node 26 doesn't auto-discover tests in directory args node --test src/ on Node 26+ treats src/ as a module path, not as a directory to scan for test files, producing a 'Cannot find module' error. Switch the test scripts to an explicit glob that lists all *.test.ts files under src/. Affects test, test:ci, test:unit. --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 8351916..a9ea8e7 100644 --- a/package.json +++ b/package.json @@ -44,9 +44,9 @@ "clean": "node -e \"fs.rmSync('dist', { recursive: true, force: true })\"", "fix:oxfmt": "oxfmt ${LEFTHOOK_FILES:-.}", "fix:oxlint": "oxlint --fix src", - "test": "npm run check:tsc && node --test --strip-types src/", - "test:ci": "c8 --reporter=text --reporter=lcov --reporter=html node --test --strip-types src/", - "test:unit": "node --test --strip-types src/", + "test": "npm run check:tsc && node --test --strip-types \"src/**/*.test.ts\"", + "test:ci": "c8 --reporter=text --reporter=lcov --reporter=html node --test --strip-types \"src/**/*.test.ts\"", + "test:unit": "node --test --strip-types \"src/**/*.test.ts\"", "use:git-commit-message": "cp commit-message-template .git/COMMIT_EDITMSG || true" }, "devDependencies": {