You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
Hi!
First of all thank you so much for the work on this preset. Finally I'm able to use
jest
withadonis
.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:After a few hours of debugging, I've realized
jest
wasn't loadingadonis-environment
, which explicitly shares this global onsetup
.Turns out I forgot to remove
testEnvironment: 'node'
fromjest.config.ts
. Since I'm kinda new tojest
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!
The text was updated successfully, but these errors were encountered: