This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
[bug] Cannot add hooks through require config #3176
Labels
You can continue the conversation there. Go to discussion →
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.The text was updated successfully, but these errors were encountered: