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

[jest] Add useFakeTimers implementation argument #45234

Merged
merged 5 commits into from
Jun 9, 2020
Merged

[jest] Add useFakeTimers implementation argument #45234

merged 5 commits into from
Jun 9, 2020

Conversation

mskelton
Copy link
Contributor

@mskelton mskelton commented Jun 2, 2020

Please fill in this template.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Add or edit tests to reflect the change. (Run with npm test.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).

Select one of these and delete the others:

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: https://jestjs.io/docs/en/jest-object#jestusefaketimersimplementation-modern--legacy
  • If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.
  • Include tests for your changes
  • If you are making substantial changes, consider adding a tslint.json containing { "extends": "dtslint/dt.json" }. If for reason the any rule need to be disabled, disable it for that line using // tslint:disable-next-line [ruleName] and not for whole package so that the need for disabling can be reviewed.

@mskelton mskelton marked this pull request as ready for review June 2, 2020 14:35
@typescript-bot
Copy link
Contributor

typescript-bot commented Jun 2, 2020

@mskelton Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 - keep an eye on this comment as I'll be updating it with information as things progress.

Code Reviews

Because this is a widely-used package, a DT maintainer will need to review it before it can be merged.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ❌ Most recent commit is approved by DT maintainers

Once every item on this list is checked, I'll ask you for permission to merge and publish the changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 45234,
  "author": "mskelton",
  "owners": [
    "NoHomey",
    "jwbay",
    "asvetliakov",
    "alexjoverm",
    "epicallan",
    "ikatyang",
    "wsmd",
    "JamieMason",
    "douglasduteil",
    "ahnpnl",
    "joshuakgoldberg",
    "UselessPickles",
    "r3nya",
    "hotell",
    "sebald",
    "andys8",
    "antoinebrault",
    "favna",
    "gstamac",
    "ExE-Boss",
    "quassnoi",
    "Belco90",
    "tonyhallett",
    "ycmjason",
    "devanshj",
    "pawfa",
    "regevbr"
  ],
  "dangerLevel": "ScopedAndTested",
  "headCommitAbbrOid": "00e08c1",
  "headCommitOid": "00e08c1fda2c571be182e182784eaab0ca0600e6",
  "mergeIsRequested": false,
  "stalenessInDays": 7,
  "lastCommitDate": "2020-06-02T14:36:49.000Z",
  "reopenedDate": "2020-06-02T14:35:10.000Z",
  "lastCommentDate": "2020-06-09T16:09:38.000Z",
  "reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/45234/files",
  "hasMergeConflict": false,
  "authorIsOwner": false,
  "isFirstContribution": true,
  "popularityLevel": "Critical",
  "anyPackageIsNew": false,
  "packages": [
    "jest"
  ],
  "files": [
    {
      "filePath": "types/jest/index.d.ts",
      "kind": "definition",
      "package": "jest"
    },
    {
      "filePath": "types/jest/jest-tests.ts",
      "kind": "test",
      "package": "jest"
    }
  ],
  "hasDismissedReview": false,
  "ciResult": "pass",
  "lastReviewDate": "2020-06-02T15:19:02.000Z",
  "reviewersWithStaleReviews": [],
  "approvalFlags": 2,
  "isChangesRequested": false
}

@typescript-bot typescript-bot added this to Needs Maintainer Review in New Pull Request Status Board Jun 2, 2020
@typescript-bot
Copy link
Contributor

🔔 @NoHomey @jwbay @asvetliakov @alexjoverm @epicallan @ikatyang @wsmd @JamieMason @douglasduteil @ahnpnl @JoshuaKGoldberg @UselessPickles @r3nya @Hotell @sebald @andys8 @antoinebrault @favna @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.

Mark Skelton added 2 commits June 2, 2020 09:36
@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label Jun 2, 2020
@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 #45234 diff
Batch compilation
Memory usage (MiB) 83.2 83.8 +0.6%
Type count 14713 14719 0%
Assignability cache size 35944 35945 0%
Language service
Samples taken 2557 2563 0%
Identifiers in tests 2557 2563 0%
getCompletionsAtPosition
    Mean duration (ms) 324.4 336.0 +3.6%
    Mean CV 10.0% 9.0%
    Worst duration (ms) 440.4 449.8 +2.1%
    Worst identifier toThrowErrorMatchingInlineSnapshot toBeLessThanOrEqual
getQuickInfoAtPosition
    Mean duration (ms) 320.7 332.3 +3.6%
    Mean CV 10.1% 9.1% -10.2%
    Worst duration (ms) 419.8 442.0 +5.3%
    Worst identifier MockedTestClass_testClassMethod_0_ret test

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 Jun 2, 2020
@orta
Copy link
Collaborator

orta commented Jun 9, 2020

Thanks!

@orta orta merged commit ee73041 into DefinitelyTyped:master Jun 9, 2020
@typescript-bot typescript-bot removed this from Needs Maintainer Review in New Pull Request Status Board Jun 9, 2020
@typescript-bot
Copy link
Contributor

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

@mskelton mskelton deleted the patch-1 branch June 9, 2020 16:30
jjballano-qatium pushed a commit to jjballano-qatium/DefinitelyTyped that referenced this pull request Jun 16, 2020
* Add useFakeTimers implementation argument

* Add tests

* Update major version

* Revert "Update major version"

This reverts commit 8fb83fc.

* Version
@ExE-Boss ExE-Boss mentioned this pull request Jun 20, 2020
10 tasks
ngbrown pushed a commit to ngbrown-forks/DefinitelyTyped that referenced this pull request Jul 11, 2020
* Add useFakeTimers implementation argument

* Add tests

* Update major version

* Revert "Update major version"

This reverts commit 8fb83fc.

* Version
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants