dillon1000/react
Commit
Browse files Add a test-only transform to catch infinite loops (#11790)
* Add a test-only transform to catch infinite loops * Only track iteration count, not time This makes the detection dramatically faster, and is okay in our case because we don't have tests that iterate so much. * Use clearer naming * Set different limits for tests * Fail tests with infinite loops even if the error was caught * Add a test
Changed paths4 files
First-parent comparisonscripts/babel/__tests__/transform-prevent-infinite-loops-test.js AddedA scripts/babel/transform-prevent-infinite-loops.js AddedM scripts/jest/preprocessor.js ModifiedM scripts/jest/setupTests.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…