We have a monorepo and use jest projects (https://jestjs.io/docs/configuration#projects-arraystring--projectconfig). Each project comes with its own jest.config.js file. When running yarn jest from the monorepo's root, Vue test files fail with Cannot read properties of undefined (reading 'extend'). When first navigating into the subdirectory and running yarn jest from there, the tests pass successfully.
When replacing @vue/vue2 as the transformer for vue files with the legacy vue-jest the same tests also pass when jest is launched from the monorepo root.
We have a monorepo and use jest projects (https://jestjs.io/docs/configuration#projects-arraystring--projectconfig). Each project comes with its own jest.config.js file. When running
yarn jest
from the monorepo's root, Vue test files fail withCannot read properties of undefined (reading 'extend')
. When first navigating into the subdirectory and runningyarn jest
from there, the tests pass successfully.When replacing
@vue/vue2
as the transformer for vue files with the legacyvue-jest
the same tests also pass when jest is launched from the monorepo root.