-
-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tsConfig option doesn't work #1408
Comments
Same here. Even though we don't have multiple projects in a workspace, our Additionally, the |
It looks like the path to
|
Thanks @amakhrov for the comment, however, in my case
the config location is changed
Also, tried your workaround and unfortunately it didn't help :( |
We have the same issue, our tests finally started with workaround above, but with thymikee/jest-preset-angular#2117 this one |
I was also able to reproduce this issue. However, I would like to add one thing. If you run the |
Hey guys, @marek-siemieniuk-morawski thanks for providing a reproduction, it speeds up the debug process. {
"preset": "jest-preset-angular",
"setupFilesAfterEnv": [
"/Users/jeb/angular-builder-jest-tsconfig-issue/node_modules/@angular-builders/jest/dist/jest-config/setup.js",
"/Users/jeb/angular-builder-jest-tsconfig-issue/node_modules/@angular-builders/jest/dist/global-mocks/style-transform.js",
"/Users/jeb/angular-builder-jest-tsconfig-issue/node_modules/@angular-builders/jest/dist/global-mocks/match-media.js"
],
"moduleNameMapper": {
"\\.(jpg|jpeg|png)$": "/Users/jeb/angular-builder-jest-tsconfig-issue/node_modules/@angular-builders/jest/dist/jest-config/mock-module.js"
},
"testMatch": [
"/Users/jeb/angular-builder-jest-tsconfig-issue/projects/foo/**/*(*.)@(spec|test).[tj]s?(x)"
],
"transform": {
"^.+\\.tsx?$": [
"ts-jest",
{
"tsconfig": "/Users/jeb/angular-builder-jest-tsconfig-issue/projects/foo/tsconfig.spec.json"
}
]
}
} As mentioned above, That said, looks like our multi-app example suffers from the same issue, it's just never popped up because it has Seems like this might be a viable workaround for you until this whole thing is sorted out - just put |
The fix is available in the latest stable version, props to @pixtron for finding and fixing the issue! 🎉 |
Describe the Bug
When I have a workspace with multiple projects:
the expected
tsconfig.spec.json
location is in the workspace root, not in the project directory (projects/foo
):Same, when I set the
tsConfig
option to set a custom path totsconfig.spec.json
, it throws the same error:Minimal Reproduction
@angular-builders/jest
guideline to migrate from Karma to JestReproduction repository:
https://github.com/marek-siemieniuk-morawski/angular-builder-jest-tsconfig-issue
Expected Behavior
tsconfig.spec.json
should be in the project locationtsConfig
is set, the expectedtsconfig.spec.json
should be accordinglyA clear and concise description of what you expected to happen.
Environment
The text was updated successfully, but these errors were encountered: