Skip to content
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 jest-preset-angular to v8.0.0 #2250

Closed
wants to merge 1 commit into from
Closed

feat(testing): update jest-preset-angular to v8.0.0 #2250

wants to merge 1 commit into from

Conversation

mehrad-rafigh
Copy link
Contributor

First of all, happy new year to all of you,

This PR supersedes #1986 due to inactivity and closes #1979 and #2165
I added the new snapshot serializer that was mentioned by @wtho and updated everything accordingly.

Hoping we can merge this asap :)

Copy link

@overlineink overlineink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks 💙, @mehrad-rafigh. I hope this PR been merged as soon as possible.

@FrozenPandaz FrozenPandaz self-assigned this Jan 3, 2020
Copy link
Collaborator

@FrozenPandaz FrozenPandaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!

Can you please keep the commit by @JoshMentzer so his work is attributed to him?

const jestConfigsToUpdate = [];

Object.keys(workspaceConfig.projects).forEach(name => {
const project = workspaceConfig.projects[name];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should go through all of the architect targets.. for targets which use @nrwl/jest:jest as the builder... and use the jestConfig option verbatim if it exists so that we can catch all jest.config.js which are referenced in workspace.json.

Copy link
Contributor Author

@mehrad-rafigh mehrad-rafigh Jan 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get your point. Is something not correct here?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, let me clarify, this only migrates targets which have a test target that uses @nrwl/jest:jest.

A user could have the following:

projects: {
  app1: {
    architect: {
      e2e: {
        builder: '@nrwl/jest:jest',
        options: { ... }
      }
    }
  }

Such projects should be migrated as well.

Closed issues: #1979, #2165

Co-authored-by: Joshua D. Mentzer <mentzerj@trinity-health.org>
@mehrad-rafigh
Copy link
Contributor Author

Hi @FrozenPandaz. Would you please review the changes I made? We really need this in nx

@mehrad-rafigh
Copy link
Contributor Author

@FrozenPandaz pinging you again, hoping you will review this :)

Copy link
Collaborator

@FrozenPandaz FrozenPandaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think having him as a co-author of your commit will persist after someone merges this PR because it assigns the merger as the co-author?

Can you have his commit there separately and we won't squash when we merge? This likely involves remaking your branch.. cherry-picking his PR and then adding your changes on top as a separate commit...

CONTRIBUTING.md Show resolved Hide resolved
const jestConfigsToUpdate = [];

Object.keys(workspaceConfig.projects).forEach(name => {
const project = workspaceConfig.projects[name];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, let me clarify, this only migrates targets which have a test target that uses @nrwl/jest:jest.

A user could have the following:

projects: {
  app1: {
    architect: {
      e2e: {
        builder: '@nrwl/jest:jest',
        options: { ... }
      }
    }
  }

Such projects should be migrated as well.

@mehrad-rafigh
Copy link
Contributor Author

mehrad-rafigh commented Jan 21, 2020

@FrozenPandaz I will take a look tonight. If I can cherry pick the commit without too much hustle, I will do it.
If its too much of a hustle I will close this PR and somebody else can give it a try.

@wtho
Copy link

wtho commented Jan 21, 2020

Sorry to mess with the discussion in this PR, but it is no big deal to incorporate the original commit.
Cherry-picking takes the file changes, but overrides the committer in the metadata. To incorporate the original committer, follow these steps (there might be more elegant ways, but I like to work file-based, when there are issues with git):

  • Checkout the original commit's repo to a new folder (https://github.com/JoshMentzer/nx/tree/feat(testing)-update-jest-preset-angular). You will then have his commit as the last one.
  • Copy your changed files to that newly checked out folder and override whatever was there before. To see which files these are, you can just check here in this PR. Then make a single commit with your changes. Set the git origin to your repo, change the branch to this one and force-push.

Even if you do not want to go on with this PR anymore, this way someone else can continue with your work, and you will still author your work in your second commit.
Anyway I think you should go on, you are almost done!

Cheers and happy coding!

@FrozenPandaz FrozenPandaz removed their assignment Jan 31, 2020
@mehrad-rafigh mehrad-rafigh deleted the feature/update-jest-preset-angular-to-8 branch February 2, 2020 08:17
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

jest-preset-angular v8 has breaking changes
4 participants