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

Include warning on Readme to remove "testEnvironment: 'node'" #8

Open
hugoaboud opened this issue Jan 14, 2022 · 0 comments
Open

Include warning on Readme to remove "testEnvironment: 'node'" #8

hugoaboud opened this issue Jan 14, 2022 · 0 comments

Comments

@hugoaboud
Copy link

Hi!

First of all thank you so much for the work on this preset. Finally I'm able to use jest with adonis.

As I was trying to set it up, I ran into some troubles with our private library, which extends Adonis functionalities. This library requires global[Symbol(ioc.use)] to be set during import, so I was receiving this message:

 TypeError: global[Symbol.for(...)] is not a function

After a few hours of debugging, I've realized jest wasn't loading adonis-environment, which explicitly shares this global on setup.

Turns out I forgot to remove testEnvironment: 'node' from jest.config.ts. Since I'm kinda new to jest this wasn't obvious at first, so I'd like to recommend you include a warning on the README just for safety.

Have a nice week!

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

1 participant