mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
fix(runner): filter out non-JS files from node tests (#26092)
## Summary - `isNodeTest()` was only checking if the path included the node test directories but not verifying the file was actually a JavaScript file - This caused `test/js/node/test/parallel/CLAUDE.md` to be incorrectly treated as a test file - Added `isJavaScript(path)` check to filter out non-JS files ## Test plan - [x] Verify CLAUDE.md is no longer picked up as a test file 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Bot <claude-bot@bun.sh> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1585,6 +1585,9 @@ function isNodeTest(path) {
|
|||||||
if (isCI && isMacOS && isX64) {
|
if (isCI && isMacOS && isX64) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (!isJavaScript(path)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
const unixPath = path.replaceAll(sep, "/");
|
const unixPath = path.replaceAll(sep, "/");
|
||||||
return (
|
return (
|
||||||
unixPath.includes("js/node/test/parallel/") ||
|
unixPath.includes("js/node/test/parallel/") ||
|
||||||
|
|||||||
Reference in New Issue
Block a user