ts-jest: Ts-jest is failing to locate the tsconfig when being run from inside yarn workspace (or lerna)

  • Issue ts-jest is failing to locate the tsconfig when being run from inside yarn workspace (or lerna)
  • Expected behavior

ts-jest should be able to pick up the tsconfig inside it

  • Link to a minimal repo that reproduces this issue

https://github.com/Bnaya/issues-repros/tree/ts-jest-and-monorepo clone run: yarn install yarn workspace foo test or cd packages/foo; yarn test;

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17 (14 by maintainers)

Most upvoted comments

@GantMan you are changing the working directory in your code, this is why it fails https://github.com/infinitered/solidarity/blob/master/__tests__/integration/solidarity-check/check-invalid.ts#L7

beforeAll(() => {
  const tempDir = tempy.directory()
  process.chdir(tempDir)
})

Try adding cleanup step and change the working directory back

Update: I’ve sent you a PR with the fix infinitered/solidarity/pull/88