-
Notifications
You must be signed in to change notification settings - Fork 30.5k
[@sinonjs/fake-timers]: add performance to node clock interface #57395
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
Conversation
Sinon Fake Timers makes the `.performance` object available on the clock object conditionally based on the current environment. Since a variation of Performance API has been available in Node.js since v8.5.0, Fake Timers will provide `clock.performance` when running on modern Node.js.
|
@jneander Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through. This is a live comment which I will keep updated. 1 package in this PR
Code ReviewsBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged. You can test the changes of this PR in the Playground. Status
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": 57395,
"author": "jneander",
"headCommitOid": "243c075f373c669208d9695aadf63a2210b63627",
"lastPushDate": "2021-11-29T22:05:37.000Z",
"lastActivityDate": "2021-11-29T22:27:29.000Z",
"hasMergeConflict": false,
"isFirstContribution": true,
"tooManyFiles": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "sinonjs__fake-timers",
"kind": "edit",
"files": [
{
"path": "types/sinonjs__fake-timers/index.d.ts",
"kind": "definition"
},
{
"path": "types/sinonjs__fake-timers/sinonjs__fake-timers-tests.ts",
"kind": "test"
}
],
"owners": [
"Nemo157",
"rogierschouten",
"zyishai",
"remcohaszing",
"JadenSimon"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "JadenSimon",
"date": "2021-11-29T22:27:29.000Z",
"isMaintainer": false
}
],
"mainBotCommentID": 980797076,
"ciResult": "pass"
} |
|
🔔 @Nemo157 @rogierschouten @zyishai @remcohaszing @JadenSimon — please review this PR in the next few days. Be sure to explicitly select |
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.
Trying to access performance on earlier versions of node just throws right?
Co-authored-by: JadenSimon <31319484+JadenSimon@users.noreply.github.com>
Yep. I confirmed that locally. While the API is available in earlier versions, the global appears to be an addition with v16. |
All reactions
Sorry, something went wrong.
|
@JadenSimon Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review? |
All reactions
Sorry, something went wrong.
Reviewers
1 more reviewer
JadenSimon
Assignees
No one assignedLabels
Projects
Milestone
No milestoneDevelopment
Successfully merging this pull request may close these issues.
Sinon Fake Timers makes the
.performanceobject available on the clock object conditionally based on the current environment. The globalperformanceobject has been made available as of v16, so Fake Timers will provideclock.performancewhen running on modern Node.js.Please fill in this template.
npm test <package to test>.Select one of these and delete the others:
If changing an existing definition: