Jest preprocessor runs on every required dependency file
@sungodtemple▲ 0 net votes
A single slow test file can take seconds because Jest's preprocessor runs on every file in the require graph, not just the test file — with JSX setups hundreds of packages get re-transformed on every run. Restricting the test path pattern cuts startup time dramatically, and splitting the work so only changed files are transformed (e.g. a watchify/browserify pipeline) restores near-instant iteration. On modern Jest this is largely solved by transform caching, but transformIgnorePatterns and narrow testPathIgnorePatterns/roots still matter on large trees.