Replies: 1 comment
-
AVA doesn't touch |
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
-
So, I'm trying to use ava in a brand new yarn PnP repository: https://github.com/Jym77/ava-test
Just ran
yarn init
,yarn set version berry
(3.5.0), andyarn add --dev ava
(5.2.0).My
package.json
is:and there is only one file
test/foo.spec.js
:When runnig
yarn test
, I get the following error:When replacing the ava config by:
(i.e. just changing the name of the variable I'm declaring), the test runs fine.
I do need to reset
NODE_OPTIONS
due to #3148 (and of course running this from a shell where I've pre-unsetNODE_OPTIONS
to not get the other error).This seems to be an interaction between yarn PnP virtual directories, and ava reading the
NODE_OPTIONS
variable. I'm not fluent enough in module resolution to dig further.Given that the problem disappears when changing part of ava config, I'm filling this issue with ava, but it might as well be yarn misunderstanding something 🤔
The problem seems to be here both with ava 5.0.0 and 5.2.0. I have another repo with ava 5.1.0 and yarn using
node_modules
(not PnP) where theNODE_OPTIONS
variable doesn't break anything.Trying to fool ava by changing:
still gets the error with the
__virtual__
path not being found.Calling a side script:
with
in
package.json
is a workaround…Beta Was this translation helpful? Give feedback.
All reactions