Skip to content

test(replay): Update jest custom matchers for replay to use differ #8047

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

Merged

Conversation

billyvg
Copy link
Member

@billyvg billyvg commented May 5, 2023

Use printDiffOrStringify() util function from jest to generate a pretty diff of the received vs expected. Also when searching for any calls for toHaveSentReplay, stop at the first call where any of the keys have a successful match, instead of always falling through to the last call.

Use `printDiffOrStringify()` util function from jest to generate a pretty diff of the received vs expected. Also when searching for *any* calls for `toHaveSentReplay`, stop at the first call where *any* of the keys have a successful match, instead of always falling through to the last call.
@billyvg billyvg requested a review from mydea May 5, 2023 00:15
@billyvg
Copy link
Member Author

billyvg commented May 5, 2023

I can't figure out why TS LSP complains about the custom matchers :/ tried moving them to a .d.ts, but still wasn't working.

@billyvg billyvg merged commit 49837ac into develop May 5, 2023
@billyvg billyvg deleted the test-replay-refactor-custom-matchers-to-use-diff-fn branch May 5, 2023 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants