-
Notifications
You must be signed in to change notification settings - Fork 465
Open
Labels
Description
Version
29.1.5
Steps to reproduce
- Clone repo https://github.com/Woodz/tsconfigReferences_with_pathAliases
- Run
yarn install
- Run
yarn test
Expected behavior
I expect the test to pass
Actual behavior
Test fails with error:
../bar/src/bar.ts:1:10 - error TS2305: Module '"@common/util"' has no exported member 'convertBoolToString'.
1 import { convertBoolToString } from '@common/util';
This is because ts-jest is mapping @common
to foo/src/common
even though the import is inside bar/src/bar.ts
, which means that the mapping for @common
should be to bar/src/common
Debug log
Not providing by default as it may contain sensitive information. Please request if needed
Additional context
Workaround is to use a custom Jest resolver as per #1648 (comment)
Environment
System:
OS: macOS 15.1
CPU: (8) arm64 Apple M2
Binaries:
Node: 22.13.0 - ~/.nvm/versions/node/v22.13.0/bin/node
Yarn: 1.22.22 - /opt/homebrew/bin/yarn
npm: 10.9.2 - ~/.nvm/versions/node/v22.13.0/bin/npm
npmPackages:
jest: 29.7.0 => 29.7.0