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
feat(testing): update to jest-preset-angular v8.0.0 #1986
feat(testing): update to jest-preset-angular v8.0.0 #1986
Conversation
@@ -69,7 +69,10 @@ function run( | |||
require.resolve('jest-preset-angular'); | |||
Object.assign(tsJestConfig, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now it is not possible to modify these options from local workspace config. Would it make sense having jest.config.js
and jest-ng.config.js
in root dir of workspace?
jest-ng.config.js
:
module.exports = {
preset: './jest.config.js',
stringifyContentPathRegex: '\\.(html|svg)$',
astTransformers: [
'jest-preset-angular/build/InlineFilesTransformer',
'jest-preset-angular/build/StripStylesTransformer'
],
snapshotSerializers: [
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js'
]
};
and then libs/dummy/jest.config.js
:
module.exports = {
name: 'dummy',
preset: '../../jest-ng.config.js',
coverageDirectory: '../../coverage/libs/dummy'
};
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see the sense of your suggestion, think that's more of a design decision would want maintainers to weigh in on; may also be more of its own PR vs part of this one as this is focused on just updating a dependency, like for like.
I'm unsure why the yarn.lock changes other than as it regards to the new jest-preset-angular; after cloning and doing yarn majority of those changes showing up without modification to package.json |
Updates to jest-preset-angular to v8.0.0, includes migrations to fix any existing projects affected by the jest-preset-angular update. closes nrwl#1979
ae166c3
to
653eda7
Compare
Just throwing this in here, could also happen in a different PR of course. Cheers! |
@JoshMentzer thank you for your PR. Could you integrate the new serializer in this PR? |
Sure thing, can probably do that later tonight. |
@JoshMentzer any news? |
Hi, waiting this to migrate. |
@JoshMentzer any update? |
This is a much needed update for the project I am on right now. Any update on the status? |
Hey all, sorry for long delay on getting this updated to include the new serializer; I plan on getting it in this week |
Hi @JoshMentzer Are you able to integrate the changes into your PR? Otherwise, I would open a PR, because we really need that feature and cannot really wait for any longer |
Maybe JoshMentzer can add you as collaborator on his fork, so you can add a commit to the branch? |
Any update please? It's blocking our work too. |
Hey @demisx 👋, according with the issue, you can performe the changes available in this PR locally till it get passed. |
@JoshMentzer 👋 I hope are you doing well! Are you working on it? If not maybe some of us are free to help solve the conflicts. |
Hi everyone, I opened a new PR addressing this issue. |
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior (This is the behavior we have today, before the PR is merged)
jest-preset-angular
is v7.0.0jest-preset-angular
to v8.0.0 causes any tests for Angular projects using Jest to fail to runExpected Behavior (This is the new behavior we can expect after the PR is merged)
jest-preset-angular
is v8.0.0Issue
#1979