react/scripts/jest
Brian Vaughn a637084320
DevTools: Add Jest snapshot serializer for number formatting (#23139)
Numbers in JavaScript can have precision issues due to how they are encoded. This shows up in snapshot tests sometimes with values like 0.0009999999999999992, which makes the tests hard to read and visually diff.

This PR adds a new snapshot serializers which clamps numbers at 3 decimal points (e.g. the above number 0.0009999999999999992 is serialized as 0.001). This new serializer does not impact non-numeric values, integers, and special numbers like NaN and Infinity.
2022-01-20 15:52:17 -05:00
..
matchers Refactored how React/DevTools log Timeline performance data (#23102) 2022-01-13 14:55:54 -05:00
spec-equivalence-reporter Update test and stack frame code to support newer V8 stack formats (#22477) 2021-10-11 18:40:42 -04:00
typescript Remove internal `act` builds from public modules (#21721) 2021-06-22 14:29:35 -07:00
TestFlags.js Move SuspenseList to experimental channel (#22765) 2021-11-15 10:12:56 -08:00
config.base.js Update jest to v26 (#21574) 2021-05-27 16:33:57 +01:00
config.build-devtools.js DevTools: Add Jest snapshot serializer for number formatting (#23139) 2022-01-20 15:52:17 -05:00
config.build.js Upgrade useSyncExternalStore to alpha channel (#22662) 2021-10-31 15:38:03 -07:00
config.source-persistent.js DevTools: Show hook names based on variable usage (#21641) 2021-07-01 14:39:18 -04:00
config.source-www.js DevTools: Show hook names based on variable usage (#21641) 2021-07-01 14:39:18 -04:00
config.source.js DevTools: Show hook names based on variable usage (#21641) 2021-07-01 14:39:18 -04:00
dont-run-jest-directly.js Add error when running jest directly (#12726) 2018-05-01 12:46:17 -07:00
jest-cli.js Console message fixed for devtools (#23067) 2022-01-05 11:45:45 -05:00
jest.js Add new test cli (#19184) 2020-06-25 20:39:50 -04:00
jestSequencer.js Parallelize Jest in CI (#19552) 2020-08-07 16:32:59 -04:00
noHaste.js Forbid Haste in Jest (#11647) 2017-11-23 18:02:47 +00:00
preprocessor.js Follow-up improvements to error code extraction infra (#22516) 2021-10-31 15:37:32 -07:00
setupEnvironment.js Initial implementation of cache cleanup (#22510) 2021-10-21 14:11:42 -07:00
setupGlobal.js Use toMatchInlineSnapshot for dehydrated values (#20618) 2021-04-26 12:30:34 -04:00
setupHostConfigs.js Resolve the true entry point during tests (#21505) 2021-06-02 18:03:29 -07:00
setupTests.build.js Update jest to v26 (#21574) 2021-05-27 16:33:57 +01:00
setupTests.js Update test and stack frame code to support newer V8 stack formats (#22477) 2021-10-11 18:40:42 -04:00
setupTests.persistent.js Update jest to v26 (#21574) 2021-05-27 16:33:57 +01:00
setupTests.www.js Set up test infra for dynamic Scheduler flags (#22139) 2021-08-20 06:56:20 -07:00
shouldIgnoreConsoleError.js Throw when `act` is used in production (#21686) 2021-06-16 16:29:51 -04:00