Skip to content
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

Merged

Conversation

petejohansonxo
Copy link
Contributor

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.

@petejohansonxo
Copy link
Contributor Author

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 {
Copy link
Contributor

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",
Copy link
Contributor

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

@bahmutov
Copy link
Contributor

bahmutov commented Nov 9, 2018

@petejohansonxo thanks for this, looks good, could you sign CLA bot please?

@petejohansonxo
Copy link
Contributor Author

@bahmutov Glad to contribute... I haven't received any emails/messages from the CLA bot like I would expect, on her or via email.

@bahmutov
Copy link
Contributor

@petejohansonxo I have told the CLA bot to recheck PRs, hope it will ask you now

@petejohansonxo
Copy link
Contributor Author

@bahmutov Done. Thanks!

@brian-mann
Copy link
Member

@bahmutov is this ready to merge?

@bahmutov
Copy link
Contributor

bahmutov commented Nov 15, 2018 via email

@brian-mann brian-mann merged commit 7640eeb into cypress-io:develop Nov 15, 2018
@petejohansonxo
Copy link
Contributor Author

@brian-mann @bahmutov What is the release frequency/timeline for changes like these? TIA.

@jennifer-shehane
Copy link
Member

@petejohansonxo It depends on the release, but we anticipate getting this out very soon since there is a pretty big fix for a regression.

@brian-mann
Copy link
Member

Released in 3.1.2.

@petejohansonxo
Copy link
Contributor Author

@jennifer-shehane @brian-mann @bahmutov Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants