[@sinonjs/fake-timers]: add performance to node clock interface#57395
[@sinonjs/fake-timers]: add performance to node clock interface#57395sandersn merged 2 commits intoDefinitelyTyped:masterfrom
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 |
JadenSimon
left a comment
There was a problem hiding this comment.
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. |
|
@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? |
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: