🐛 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.
This commit is contained in:
1 parent
7de4604ab4
commit
24a3880aad
1 file changed
+3
-3
+3
-3
@@ -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": {
|
||||
|
||||
Reference in new issue
Block a user