mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
d3e0a3aaf3
`toWarnDev` calls `jestDiff(a, b)` which calls `diffStrings(a, b)` where by default `a` is annotated as `'Expected'` (green), `b` as `'Received'` (red). So the first argument passed into `jestDiff` should be the expected message, the second should be the actual message. It was vice versa previously. - https://github.com/facebook/jest/blob/457776b2889a9be1ce8a2c636a23417264a98d99/packages/jest-diff/src/index.js#L54 - https://github.com/facebook/jest/blob/457776b2889a9be1ce8a2c636a23417264a98d99/packages/jest-diff/src/index.js#L93 - https://github.com/facebook/jest/blob/457776b2889a9be1ce8a2c636a23417264a98d99/packages/jest-diff/src/diff_strings.js#L249-L251