Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate Jest's new custom equality matchers #491

Open
stephenh opened this issue Jan 3, 2023 · 0 comments
Open

Investigate Jest's new custom equality matchers #491

stephenh opened this issue Jan 3, 2023 · 0 comments
Labels
good first issue Good for newcomers hack day seems doable in a hack day

Comments

@stephenh
Copy link
Collaborator

stephenh commented Jan 3, 2023

Historically Jest's toEqual has caused us grief b/c of recursively diffing entities down to the connection pool, which can end up pegging a CPU for ~several seconds even on a passing assertion.

We've written toMatchEntity to avoid this, but it requires teaching programmers when to use it.

Jest just landed custom equality matchers:

jestjs/jest#13654

So we can see if that helps. My suspicion is that toMatchEntity's diff output will still be easier to read, so it probably won't completely go away, but if we can de-suck toEqual, that would be great too.

@stephenh stephenh added good first issue Good for newcomers hack day seems doable in a hack day labels Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers hack day seems doable in a hack day
Projects
None yet
Development

No branches or pull requests

1 participant