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

Jest Integration #188

Closed
NateAGeek opened this issue Jun 15, 2022 · 3 comments
Closed

Jest Integration #188

NateAGeek opened this issue Jun 15, 2022 · 3 comments

Comments

@NateAGeek
Copy link

I ideally would like to add this project and use it for my e2e unit tests, using jest. I've come into the issue of getting Jest to play nicely with the cjs version of the project. However, I am curious if we could add documentation or better accommodate Jest support?

@OrKoN
Copy link
Collaborator

OrKoN commented Jun 21, 2022

Could you please describe what problems are you facing with jest? Theoretically, there should be no issues just because of Jest.

@NateAGeek
Copy link
Author

I think @adamraine merge, make cjs the main entry point, might actually make the issue I was facing resolved. Since the current library uses ESM version as entry point, Jest errors out. Jest is not really compatible with ESM, without some configuration tweaks. Also, I had to require the full path for cjs, and I did loose typing info along the way. But now I think this should be resolved. I'll test and confirm, thank you.

@NateAGeek
Copy link
Author

Yep, the new cjs main entry resolved my issue, thank you @adamraine!

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

2 participants