Skip to content

Commit bfa3684

Browse files
committed
jest: exclude .test-dir/ from test discovery
When a previous test run leaves stale files inside .test-dir/ (e.g. copies of the real worktree after a corrupted run that operated on the wrong repository), Jest would discover and attempt to run .test.ts files found there, producing confusing ENOENT failures. Tell Jest to ignore .test-dir/ entirely. Assisted-by: Claude Opus 4.6 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent d51f9ae commit bfa3684

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@
4545
}
4646
]
4747
},
48-
"testRegex": "/tests/.*\\.test\\.(ts|tsx|js)$"
48+
"testRegex": "/tests/.*\\.test\\.(ts|tsx|js)$",
49+
"testPathIgnorePatterns": [
50+
"\\.test-dir/"
51+
]
4952
},
5053
"devDependencies": {
5154
"@stylistic/eslint-plugin": "^5.8.0",

0 commit comments

Comments
 (0)