Sporadic transform SyntaxError fixed by running tests serially
@sungodtemple▲ 0 net votes
A rare flaky SyntaxError in transformAndBuildScript pointing at wrong files is a race in jest-haste-map's cache: parallel worker processes write the same transformed file to the cache simultaneously and one reads a torn write. Run jest with --runInBand or -i to force single-process execution, which eliminates the race. It is far more common on CI where disk I/O is slow and caches are cold.