diff --git a/docs/api/expect.md b/docs/api/expect.md index caa88491d..435fd5680 100644 --- a/docs/api/expect.md +++ b/docs/api/expect.md @@ -1362,7 +1362,7 @@ test('"id" is a number', () => { `expect.closeTo` is useful when comparing floating point numbers in object properties or array item. If you need to compare a number, please use `.toBeCloseTo` instead. -The optional `numDigits` argument limits the number of digits to check **after** the decimal point. For the default value `2`, the test criterion is `Math.abs(expected - received) < 0.005 (that is, 10 ** -2 / 2)`. +The optional `precision` argument limits the number of digits to check **after** the decimal point. For the default value `2`, the test criterion is `Math.abs(expected - received) < 0.005 (that is, 10 ** -2 / 2)`. For example, this test passes with a precision of 5 digits: