Post

Sure so we use one nextjs app and a few smaller react apps and everything is using jest, msw and react testing library for tests. Jest is being a huge pain because of ESM woes, monorepo configs, globals, missing node functions etc. I already migrated to jest-fixed-jsdom but'd rather go vitest

0 reposts1 like

So this is a monorepo created with Nx? or is it based on an npm/pnpm workspace and created with the respective CLIs (for Next etc)? Sorry just trying to understand the underlying infra :)

Appreciate it! Original creation is pre-me but it is using yarn workspaces and Nx, yes. Currently it does not use nx/next for the next app but that is basically what I'm working on because our build cache does not cache.

(side story, I was kinda hoping for some incr. cache but every little change busts). Jest is run in ci and locally via an executor (nx run-many -> yarn test). They tried having a shared config that gets imported in each package but I think that might be the wrong approach for Jest.