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

Comments: Testing React Tracking with Jest and Enzyme #683

Open
mdole opened this issue Apr 16, 2021 · 0 comments
Open

Comments: Testing React Tracking with Jest and Enzyme #683

mdole opened this issue Apr 16, 2021 · 0 comments

Comments

@mdole
Copy link
Contributor

mdole commented Apr 16, 2021

Recently, I needed to test a button that would make an analytics tracking call using react-tracking and then navigate to a new page in a callback. This presented some challenges - I wasn't sure how to create a mocked version of react-tracking that would allow a callback to be passed.
With some help from fellow Artsy engineers Christopher Pappas and Pavlos Vinieratos, I got the tracking and testing to work. Here's how we did it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant