@types/qunit use same interface for skip, only, todo as for test.skip…#70977
@types/qunit use same interface for skip, only, todo as for test.skip…#70977vstefanovic97 wants to merge 1 commit into
Conversation
…, test.only, test.todo
|
@vstefanovic97 Thank you for submitting this PR! This is a live comment that I will keep updated. 1 package in this PRCode ReviewsThis PR can be merged once it's reviewed by a DT maintainer. 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": 70977,
"author": "vstefanovic97",
"headCommitOid": "03844370e59a18de8a4bda51671c1751f4078de9",
"mergeBaseOid": "ce42f698cfa545277de0abe6bfc48974d64634f9",
"lastPushDate": "2024-10-22T08:33:44.000Z",
"lastActivityDate": "2024-10-29T18:49:39.000Z",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Popular",
"pkgInfo": [
{
"name": "qunit",
"kind": "edit",
"files": [
{
"path": "types/qunit/index.d.ts",
"kind": "definition"
}
],
"owners": [
"waratuman",
"sechel",
"gitKrystan",
"jamescdavis",
"wagenet",
"Krinkle"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Popular"
}
],
"reviews": [
{
"type": "changereq",
"reviewer": "Krinkle",
"date": "2024-10-29T18:49:39.000Z"
},
{
"type": "approved",
"reviewer": "RyanCavanaugh",
"date": "2024-10-29T16:29:17.000Z",
"isMaintainer": true
}
],
"mainBotCommentID": 2428623189,
"ciResult": "pass"
} |
|
🔔 @waratuman @sechel @gitKrystan @jamescdavis @wagenet @Krinkle — please review this PR in the next few days. Be sure to explicitly select |
|
Thank you @vstefanovic97! |
|
Does this mean I'm open to revisiting that but that's the current state. I do note these have doc comments above them which might narrow this to the function only? |
|
@Krinkle if I understend what you are saying QUnit.test.todo.eachIs ok, but QUnit.todo.eachIs not ok? I agree that See codepen example: Am I missing something? |
|
⏳ Hi @vstefanovic97, It's been a few days since this PR was approved by Krinkle and we're waiting for a DT maintainer to give a review. If you would like to short-circuit this wait, you can edit some of the test files in the package that verify how the |
|
@vstefanovic97 I understand that it technically works, but it's not supported. It works because we re-use the same function by reference. There hasn't yet been an internal reason to wilfully break it, although now that we know about it, maybe we will do that in QUnit 3. The top-level aliases predate the existence of each(). There is no reason for anyone to use "each" via that route (I'm open to use cases), and no reason to my knowledge to encourage a bifurcation in the ecosystem by having two ways to do the same thing. If it ends up suggested in IDEs it seems likely it'll be used by someone who would've been equally happy to use it the normal way. Except then there'd be an inconsistency. This in turn makes code review, static analysis, and ESLint rules harder to get right. |
|
@Krinkle well in that case I guess we shouldn't even merge this then? |
|
@vstefanovic97 Yeah, although the optional callback fix would be welcome. And, if it helps with ember-qunit I would also welcome any reuse like It may also be possible to structure it such that |
|
@vstefanovic97 One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you! |
|
@Krinkle as per agreement I'm closing this and will open a new PR for just this minor fixes, refactors |

…, test.only, test.todo
Please fill in this template.
pnpm test <package to test>.Select one of these and delete the others:
If changing an existing definition:
package.json.Since the previous PR actually broke overrides inside of
ember-qunitthe next steps are to fix the overrides over there.First step is merging this PR
Second step in
ember-qunit/types/index.d.tswe can just doWhich will extend the overloads properly again