-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
Add types to @types/qunit
that are needed for ember-qunit
#63805
Add types to @types/qunit
that are needed for ember-qunit
#63805
Conversation
@gitKrystan Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PRCode ReviewsBecause you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it. You can test the changes of this PR in the Playground. Status
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": 63805,
"author": "gitKrystan",
"headCommitOid": "6da98c46b675850da61b0a008851ae34dc4c0d87",
"mergeBaseOid": "a79ac14faaee3afff32af2c799f05ad217182bcf",
"lastPushDate": "2023-01-05T18:42:09.000Z",
"lastActivityDate": "2023-01-05T19:41:01.000Z",
"mergeOfferDate": "2023-01-05T19:36:58.000Z",
"mergeRequestDate": "2023-01-05T19:41:01.000Z",
"mergeRequestUser": "Krinkle",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Popular",
"pkgInfo": [
{
"name": "qunit",
"kind": "edit",
"files": [
{
"path": "types/qunit/index.d.ts",
"kind": "definition"
},
{
"path": "types/qunit/test/global-test.ts",
"kind": "test"
}
],
"owners": [
"waratuman",
"mike-north",
"sechel",
"chriskrycho",
"dfreeman",
"jamescdavis",
"Krinkle"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Popular"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "Krinkle",
"date": "2023-01-05T19:36:12.000Z",
"isMaintainer": false
}
],
"mainBotCommentID": 1371609292,
"ciResult": "pass"
} |
🔔 @waratuman @mike-north @sechel @chriskrycho @dfreeman @jamescdavis @Krinkle — please review this PR in the next few days. Be sure to explicitly select |
@gitKrystan The CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! Note: builds which are failing do not end up on the list of PRs for the DT maintainers to review. |
This is an internal undocumented property. I'd prefer we silence the use in ember-qunit for the time being instead of possibly encouraging use elsewhere by documenting it for TypeScript. In QUnit 3, I intend to make two major changes ref qunitjs/qunit#1483:
For the ember-qunit, I see a number of ways forward:
|
@gitKrystan The CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! Note: builds which are failing do not end up on the list of PRs for the DT maintainers to review. |
1a63b5f
to
6da98c4
Compare
Sounds good. I removed it from this PR and updated my ember-qunit PR accordingly. Any thoughts on the rest of the stuff? Specifically, is there anything else on the Test and Module interfaces you'd like to make public while I'm at it? |
@gitKrystan Beyond what is on https://api.qunitjs.com/extension/, I'd consider the Module and Test objects fully internal. They're fairly stable, but to ease maintenance of the TS definitions I'd recommend against adding much detail here beyond that helps you right now. |
@gitKrystan If you're interested, perhaps you'd like to look at adding I have an old PR at #62328 but can't find the time to get it in mergable state. It's a relatively new and well-liked features, but lacking TS definitions at the moment. |
Ready to merge |
Hey everyone! it has been well over a year. What is blocking |
Adds and fixes types used by
ember-qunit
in emberjs/ember-qunit#994Add optional
source
property toAssert.pushResult
argument:https://github.com/qunitjs/qunit/blob/fc278e8c0d7e90ec42e47b47eee1cc85c9a9efaf/src/test.js#L572
Make
QUnit.config.testTimeout
optional:https://github.com/qunitjs/qunit/blob/fc278e8c0d7e90ec42e47b47eee1cc85c9a9efaf/src/test.js#L733
ember-qunit
setstestTimeout
tonull
in "dev mode." Additionally, code surroundingtestTimeout
seems to assume it can be something other than a number.AddQUnit.config.timeout
type: https://github.com/qunitjs/qunit/blob/fc278e8c0d7e90ec42e47b47eee1cc85c9a9efaf/src/test.js#L752Add
QUnit.urlParams
type:https://github.com/qunitjs/qunit/blob/fc278e8c0d7e90ec42e47b47eee1cc85c9a9efaf/src/html-reporter/html.js#L256
https://github.com/qunitjs/qunit/blob/fc278e8c0d7e90ec42e47b47eee1cc85c9a9efaf/test/reporter-urlparams.js#L11
Adds
Module
interface:https://github.com/qunitjs/qunit/blob/fc278e8c0d7e90ec42e47b47eee1cc85c9a9efaf/src/module.js#L45
I included only the properties needed for
ember-qunit
but left some commented out properties I discovered during my code reading but didn't need. Do you want to make any of these public?Adds
Test
interface:https://github.com/qunitjs/qunit/blob/fc278e8c0d7e90ec42e47b47eee1cc85c9a9efaf/src/test.js#L23
I included only the properties needed for
ember-qunit
but left some commented out properties I discovered during my code reading but didn't need. Do you want to make any of these public?npm test <package to test>
.Select one of these and delete the others:
If changing an existing definition:
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.