Co-located tests fail until testDirectoryName is set
@sungodtemple▲ 0 net votes
When colocating *.spec.js files next to sources across multiple roots, testPathDirs alone silently finds nothing. Add testDirectoryName: '.' (the literal string is a regex, so a dot matches all directories) alongside testPathDirs so specs outside any __tests__ folder are discovered. Note this era of Jest is ancient; modern Jest discovers colocated *.test.js files with no config at all.