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
Issue with Angular 8: src/tsconfig.spec.json
=> tsconfig.spec.json
#286
Comments
I personally agree, as we want to make the use of jest for Angular users as easy as possible. PRs are welcome! This will be a breaking change and should be documented in README.md and CHANGELOG.md. |
Thanks @wtho for your quick reply. |
my migration to 8 didn't move it to the parent @yjaaidi |
Yeah, they only do this in newly generated Angular8 projects. As we will support v7 and older as well as migrated projects, we will have to explain this in the migration guide. I have not looked into the original change in the Angular repo, there might be a discussion that can help us to decide what to put as the default. I personally would interpret this change as that the recommended location now is in |
As temporary solution, you can add this configuration into globals: {
'ts-jest': {
tsConfig: '<rootDir>/tsconfig.spec.json'
},
}, |
Now I get this error:
|
This now should work: module.exports = {
preset: 'jest-preset-angular',
setupFilesAfterEnv: ['<rootDir>/setupJest.ts'],
globals: {
'ts-jest': {
tsConfig: '<rootDir>/tsconfig.spec.json',
diagnostics: false
},
},
}; |
@dgroh
|
Got it working with the following config:
The big problem that solved it for me is that on the following page: https://github.com/thymikee/jest-preset-angular#exposed-configuration It states: |
The Jest schematic referenced in this issue has been updated for Angular 8. https://github.com/briebug/jest-schematic |
Hi there,
Since Angular 8,
tsconfig.spec.json
isn’t in ˋsrc` anymore but in the parent folder.Shall we change the default path in order to avoid overriding it in the configuration?
Cf. briebug/jest-schematic#12
Thanks
The text was updated successfully, but these errors were encountered: