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

fix(jest): add createMockFromModule to replace genMockFromModule #46274

Merged
merged 7 commits into from Aug 14, 2020

Conversation

Calvin-LL
Copy link
Contributor

@Calvin-LL Calvin-LL commented Jul 22, 2020

jestjs/jest#9962 adds createMockFromModule to replace genMockFromModule. This pull request adds createMockFromModule.

CI not passing due to #46271 (comment)

@typescript-bot
Copy link
Contributor

typescript-bot commented Jul 22, 2020

@CoolCyberBrain Thank you for submitting this PR!

This is a live comment which I will keep updated.

Code Reviews

Because you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ Most recent commit is approved by type definition owners or DT maintainers

All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 46274,
  "author": "CoolCyberBrain",
  "owners": [
    "NoHomey",
    "jwbay",
    "asvetliakov",
    "alexjoverm",
    "epicallan",
    "ikatyang",
    "wsmd",
    "JamieMason",
    "douglasduteil",
    "ahnpnl",
    "joshuakgoldberg",
    "UselessPickles",
    "r3nya",
    "hotell",
    "sebald",
    "andys8",
    "antoinebrault",
    "gstamac",
    "ExE-Boss",
    "quassnoi",
    "Belco90",
    "tonyhallett",
    "ycmjason",
    "devanshj",
    "pawfa",
    "regevbr"
  ],
  "dangerLevel": "ScopedAndTested",
  "headCommitAbbrOid": "18a4ec5",
  "headCommitOid": "18a4ec5c79b4603e239cd11841db7dac8ff0b5a7",
  "mergeIsRequested": true,
  "stalenessInDays": 0,
  "lastPushDate": "2020-07-23T20:56:05.000Z",
  "lastCommentDate": "2020-08-14T23:38:46.000Z",
  "maintainerBlessed": true,
  "reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/46274/files",
  "hasMergeConflict": false,
  "authorIsOwner": false,
  "isFirstContribution": false,
  "popularityLevel": "Critical",
  "anyPackageIsNew": false,
  "packages": [
    "jest"
  ],
  "files": [
    {
      "path": "types/jest/index.d.ts",
      "kind": "definition",
      "package": "jest"
    },
    {
      "path": "types/jest/jest-tests.ts",
      "kind": "test",
      "package": "jest"
    }
  ],
  "hasDismissedReview": false,
  "ciResult": "pass",
  "lastReviewDate": "2020-08-14T23:34:17.000Z",
  "reviewersWithStaleReviews": [],
  "approvalFlags": 2,
  "isChangesRequested": false
}

@typescript-bot
Copy link
Contributor

typescript-bot commented Jul 22, 2020

🔔 @NoHomey @jwbay @asvetliakov @alexjoverm @epicallan @ikatyang @wsmd @JamieMason @douglasduteil @ahnpnl @JoshuaKGoldberg @UselessPickles @r3nya @Hotell @sebald @andys8 @antoinebrault @gstamac @ExE-Boss @quassnoi @Belco90 @tonyhallett @ycmjason @devanshj @pawfa @regevbr — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

@typescript-bot typescript-bot added this to Needs Author Action in New Pull Request Status Board Jul 22, 2020
@typescript-bot
Copy link
Contributor

@CoolCyberBrain The CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

@typescript-bot
Copy link
Contributor

@CoolCyberBrain The CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

@typescript-bot
Copy link
Contributor

👋 Hi there! I’ve run some quick measurements against master and your PR. These metrics should help the humans reviewing this PR gauge whether it might negatively affect compile times or editor responsiveness for users who install these typings.

Let’s review the numbers, shall we?

Comparison details 📊
master #46274 diff
Batch compilation
Memory usage (MiB) 84.6 84.4 -0.3%
Type count 14837 14841 0%
Assignability cache size 4886 4887 0%
Language service
Samples taken 2700 2708 0%
Identifiers in tests 2700 2708 0%
getCompletionsAtPosition
    Mean duration (ms) 367.8 371.0 +0.9%
    Mean CV 7.8% 7.8%
    Worst duration (ms) 500.9 550.7 +9.9%
    Worst identifier describe expect
getQuickInfoAtPosition
    Mean duration (ms) 368.5 371.2 +0.7%
    Mean CV 8.3% 8.2% -1.9%
    Worst duration (ms) 496.4 499.8 +0.7%
    Worst identifier expect mockRejectedValue

It looks like nothing changed too much. I won’t post performance data again unless it gets worse.

@typescript-bot typescript-bot added the Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. label Jul 22, 2020
@typescript-bot typescript-bot removed the The CI failed When GH Actions fails label Jul 23, 2020
@typescript-bot typescript-bot moved this from Needs Author Action to Needs Maintainer Review in New Pull Request Status Board Jul 23, 2020
@sheetalkamat sheetalkamat moved this from Needs Maintainer Review to Waiting for Code Reviews in New Pull Request Status Board Jul 23, 2020
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board Jul 23, 2020
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Waiting for Code Reviews in New Pull Request Status Board Jul 23, 2020
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board Jul 23, 2020
@sheetalkamat sheetalkamat moved this from Needs Maintainer Review to Waiting for Code Reviews in New Pull Request Status Board Jul 24, 2020
@typescript-bot typescript-bot added the Unmerged The author did not merge the PR when it was ready. label Aug 2, 2020
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Action in New Pull Request Status Board Aug 2, 2020
@Mike377
Copy link

Mike377 commented Aug 6, 2020

Is this going to be merged soon?

@typescript-bot typescript-bot removed the Unmerged The author did not merge the PR when it was ready. label Aug 6, 2020
@typescript-bot typescript-bot moved this from Needs Maintainer Action to Waiting for Code Reviews in New Pull Request Status Board Aug 6, 2020
Copy link
Contributor

@wsmd wsmd left a comment

Choose a reason for hiding this comment

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

Thanks @CoolCyberBrain!

@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label Aug 14, 2020
@typescript-bot typescript-bot added the Self Merge This PR can now be self-merged by the PR author or an owner label Aug 14, 2020
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Waiting for Author to Merge in New Pull Request Status Board Aug 14, 2020
@typescript-bot
Copy link
Contributor

@CoolCyberBrain Everything looks good here. Great job! I am ready to merge this PR on your behalf.

If you'd like that to happen, please post a comment saying:

Ready to merge

and I'll merge this PR almost instantly. Thanks for helping out! ❤️

(@NoHomey, @jwbay, @asvetliakov, @alexjoverm, @epicallan, @ikatyang, @wsmd, @JamieMason, @douglasduteil, @ahnpnl, @JoshuaKGoldberg, @UselessPickles, @r3nya, @Hotell, @sebald, @andys8, @antoinebrault, @gstamac, @ExE-Boss, @quassnoi, @Belco90, @tonyhallett, @ycmjason, @devanshj, @pawfa, @regevbr: you can do this too.)

@Calvin-LL
Copy link
Contributor Author

Ready to merge

@typescript-bot typescript-bot moved this from Waiting for Author to Merge to Recently Merged in New Pull Request Status Board Aug 14, 2020
@typescript-bot typescript-bot merged commit 9c680c4 into DefinitelyTyped:master Aug 14, 2020
@typescript-bot
Copy link
Contributor

I just published @types/jest@26.0.10 to npm.

@typescript-bot typescript-bot removed this from Recently Merged in New Pull Request Status Board Aug 15, 2020
chivesrs pushed a commit to chivesrs/DefinitelyTyped that referenced this pull request Sep 2, 2020
…` to replace `genMockFromModule` by @CoolCyberBrain

* fix(jest): add `createMockFromModule` to replace `genMockFromModule`

* test(jest): add test for `jest.createMockFromModule`

* style(jest): remove trailing whitespace

* docs(jest): remove deprecated tag

* Revert "docs(jest): remove deprecated tag"

This reverts commit 875b63a.

* Revert "Revert "docs(jest): remove deprecated tag""

This reverts commit 0fb5fc3.
danielrearden pushed a commit to danielrearden/DefinitelyTyped that referenced this pull request Sep 22, 2020
…` to replace `genMockFromModule` by @CoolCyberBrain

* fix(jest): add `createMockFromModule` to replace `genMockFromModule`

* test(jest): add test for `jest.createMockFromModule`

* style(jest): remove trailing whitespace

* docs(jest): remove deprecated tag

* Revert "docs(jest): remove deprecated tag"

This reverts commit 875b63a.

* Revert "Revert "docs(jest): remove deprecated tag""

This reverts commit 0fb5fc3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Critical package Owner Approved A listed owner of this package signed off on the pull request. Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. Self Merge This PR can now be self-merged by the PR author or an owner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants