odoo/o-spreadsheet#8841

Created by BI, Adrien Minne (adrm)

Blocked

label
odoo:master-jest-custom-matchers-tests-adrm
head
98328ee5fcf00687bcd5487cb6eafea5ccf43a29
odoo/o-spreadsheet
master #8841 missing statuses missing r+

[IMP] tests: add tests for custom jest matchers

Description:

[IMP] tests: add tests for custom jest matchers

We define custom jest matcher (eg. expect(color).toBeSameColorAs(otherColor))
but never actually test that those work correctly. They, in fact, did not.

Most of the error message tests are written with snapshots, because
we use jest helpers to color/prettify the output, and testing those
is a pain.

[REF] tests: remove custom toBeCloseTo matcher

We re-defined the standard toBeCloseTo matcher in order to use it
in expect(...).toMatchObject({ x: expect.toBeCloseTo(...)}). But
we can just use expect.closeTo(1000) instead.

Task: 6272392

review checklist