From a7be50dbceea31611403542caca7ebf44e4e014a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Wei=C3=9Fenfels?= <10491533+tim-we@users.noreply.github.com> Date: Thu, 1 Aug 2024 13:44:01 +0200 Subject: [PATCH] docs: Fix argument name in expect.md (#6254) --- docs/api/expect.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- knotmirror 0.0.1