Skip to content

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

Merged
billyvg merged 1 commit intodevelopfrom
test-replay-refactor-custom-matchers-to-use-diff-fn
May 5, 2023
Merged

test(replay): Update jest custom matchers for replay to use differ#8047
billyvg merged 1 commit intodevelopfrom
test-replay-refactor-custom-matchers-to-use-diff-fn

Conversation

@billyvg
Copy link
Copy Markdown
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
Copy Markdown
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