-
Notifications
You must be signed in to change notification settings - Fork 3.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
chore: remove pkg/driver //@ts-nocheck final #20169
chore: remove pkg/driver //@ts-nocheck final #20169
Conversation
Thanks for taking the time to open a PR!
|
41f282d
to
339c30b
Compare
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.
There is a lot of any
in here, but this is still quite an improvement, nice work @sainthkh. Looking forward to future PRs that improve type safety even more.
|
||
addToLogs(log) | ||
export default { |
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.
nit: it would be cool to get rid of export default { function1, function2 }
and use export function1; export function2
where possible
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.
I didn't change it because we're currently importing them as import $Log from './log'
. I guess this can be fixed after refactoring log to class.
@@ -449,7 +459,7 @@ const overrideRunnerHook = (Cypress, _runner, getTestById, getTest, setTest, get | |||
|
|||
const getTestResults = (tests) => { | |||
return _.map(tests, (test) => { | |||
const obj = _.pick(test, 'id', 'duration', 'state') | |||
const obj: any = _.pick(test, 'id', 'duration', 'state') |
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.
Can this be Record<string, any>?
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.
I changed it that way.
packages/driver/src/cypress.ts
Outdated
@@ -75,7 +187,7 @@ class $Cypress { | |||
this.setConfig(config) | |||
} | |||
|
|||
setConfig (config = {}) { | |||
setConfig (config: any = {}) { |
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.
Can this be Record<string, any>?
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.
I changed it that way.
packages/driver/src/cypress/log.ts
Outdated
@@ -86,7 +84,7 @@ const getSnapshotProps = (attrs) => { | |||
return _.pick(attrs, SNAPSHOT_PROPS) | |||
} | |||
|
|||
const countLogsByTests = function (tests = {}) { | |||
const countLogsByTests = function (tests: any = {}) { |
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.
Can this be Record<string, any>?
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.
I changed it that way.
24d9069
to
dc92a73
Compare
* 10.0-release: fix: comment link to accurate docs (#20437) fix: scaffold commands file (#20398) fix(launchpad): support default export (#20383) feat(launchpad): support for Vue CLI 5 (#20413) fix: UNIFY-676 browsers should be configurable in setupNodeEvents (#20367) fix: make launchpad link open default browser (#20399) fix(icons): publish the files in the package fix: build icons in build-prod (#20411) test: migrate module-api to 10.0 chore: build this branch test: migrate module_api to system tests (#20265) chore: remove pkg/driver //@ts-nocheck final (#20169) chore: fix "cannot find module" in clone-repo-and-checkout-release-branch (#20293) chore: Update Chrome (beta) to 99.0.4844.45 (#20234) chore: fix CI cache state for darwin (#20339) Add TODO comments feedback chore: move tests to its own file.
create
into class$Cy
#18715User facing changelog
N/A. It's just removing
// @ts-nocheck
comments and defining types to avoid type errors.Additional details
How has the user experience changed?
N/A
PR Tasks
cypress-documentation
?type definitions
?cypress.schema.json
?