Skip to content

.isCloseTo

Arthur Guiot edited this page Oct 14, 2017 · 1 revision

How it works?

.isCloseTo() will tell you if the initial value is close to the expected value, depending on the precision you choose. By default, the precision is set to 2

Example

eye.test("isClose", "node",
    $ => $(0.2 + 0.4).isCloseTo(0.6, 1),
    $ => $(10).isCloseTo(11, -1)
)

⚠️ Questions?

Don't hesitate to ask your questions ⁉️ in the issue part 😁

Clone this wiki locally