a637084320
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. |
||
---|---|---|
.. | ||
babel | ||
bench | ||
circleci | ||
devtools | ||
error-codes | ||
eslint | ||
eslint-rules | ||
flow | ||
git | ||
jest | ||
merge-fork | ||
perf-counters | ||
prettier | ||
print-warnings | ||
release | ||
rollup | ||
shared | ||
tasks | ||
yarn | ||
authors |