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 strong typed definition for Cypress.moment(). #2746
Add strong typed definition for Cypress.moment(). #2746
Conversation
Not sure about the CI failure here https://circleci.com/gh/cypress-io/cypress/39362#tests/containers/2 seems to be in some timer test unrelated to my changes... |
@@ -5,6 +5,14 @@ namespace CypressLodashTests { | |||
}) | |||
} | |||
|
|||
namespace CypressMomentTests { |
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.
nice, thanks for adding a few type assertions here
@@ -70,6 +70,7 @@ | |||
"lodash": "4.17.10", | |||
"log-symbols": "2.2.0", | |||
"minimist": "1.2.0", | |||
"moment": "2.22.2", |
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.
ok, challenge is how to keep this moment
version in sync with actual bundled version of moment
, but should be close enough to just grab types
@petejohansonxo thanks for this, looks good, could you sign CLA bot please? |
@bahmutov Glad to contribute... I haven't received any emails/messages from the CLA bot like I would expect, on her or via email. |
@petejohansonxo I have told the CLA bot to recheck PRs, hope it will ask you now |
@bahmutov Done. Thanks! |
@bahmutov is this ready to merge? |
@brian-mann @bahmutov What is the release frequency/timeline for changes like these? TIA. |
@petejohansonxo It depends on the release, but we anticipate getting this out very soon since there is a pretty big fix for a regression. |
Released in |
@jennifer-shehane @brian-mann @bahmutov Thanks! |
The
Cypress.moment
field isn't strongly typed currently, which means no nice completion/checks when using it from tests written in TypeScript. This adds the TS definition for that.