Jest parses every package.json including broken test fixtures
@sungodtemple▲ 0 net votes
jest-haste-map crawls the whole project and JSON.parses every file named package.json it finds, so a deliberately broken fixture file crashes every test suite with Unexpected end of JSON input. Exclude it via modulePathIgnorePatterns in jest config with a regex matching the fixture path, e.g. '.*fixtures/.*package\.json'. modulePathIgnorePatterns feeds jest-haste-map's internal ignorePattern, so paths must be regex-escaped carefully or they will never match.