Replies: 1 comment
-
Interesting! As you've found, the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
With AVA 5.2.0 on Windows, I just ran into pretty much this issue: #1944
…the only difference being that I don't want to setup something like a database but prepare the worker's state.
I have this config:
In
setupTests.ts
, I have this, basically:If I read #1944 (comment) correctly, that's the correct approach for worker-global setup. However, running either
npx ava
ornpm test
(the script beingava --watch
), I get this Error for each test file:That does not happen if I remove the
require
config and add this to my test files (which is what I'm going with now):This looks like a bug with the
require
config to me. Otherwise, I misunderstand howrequire
and workers relate. In any case, some more documentation on whatrequire
is supposed to do or how it works would be nice. Maybe a recipe with a real use-case.Beta Was this translation helpful? Give feedback.
All reactions