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 #304

Closed
gcperrin opened this issue Jun 7, 2018 · 4 comments
Closed

Jest integration #304

gcperrin opened this issue Jun 7, 2018 · 4 comments

Comments

@gcperrin
Copy link

gcperrin commented Jun 7, 2018

Beginning an integration of a customer codebase with Jest for testing.

Email-templates (and really I believe the dependency fs-extra) is failing on import/require for some reason. Note that our use of the package for email/templating has been running in production just fine. It only fails within the test runner. At first I thought it might be a path issue with the templates but after further digging it is actually failing on import/require.

Snippet of the error below for consideration

Thanks,
G

screen shot 2018-06-07 at 1 37 15 pm

@pmpbar
@niftylettuce
Copy link
Collaborator

I believe I've solved this for you in the latest version v4.0.3 of email-templates! (hopefully 🤞 )

Seems to be possibly related to jestjs/jest#6399 isaacs/node-graceful-fs#102, and jestjs/jest#5239.

I just dropped the usage of fs-extra (which used graceful-fs and that seemed to have several issues with it) so perhaps try the latest version of email-templates, v4.0.3+ via yarn add email-templates@latest. Please confirm this is the correct version installed by opening node_modules/email-templates/package.json afterwards and seeing that version property value is 4.0.3.

Let me know once you've installed latest version and have tried again - does the issue still persist? Did you solve it some other way? If so, can you please update our README here with any tips/instructions for jest configuration?

I also sent you guys an email just now in case you don't get GH notifications.

Thanks many @pmpbar @gcperrin 👏 👍

@taybart
Copy link

taybart commented Aug 1, 2018

Thanks Lechuga! Keep up the good work!

@niftylettuce
Copy link
Collaborator

Thanks @taybartski - I just set up a Patreon and PayPal so I can keep this momentum going! ❤️ ❤️ ❤️

@niftylettuce
Copy link
Collaborator

this is related to #318 - there is one more dep that requires fs-extra, fixing now

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

No branches or pull requests

3 participants