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
Wrong typings in cypress-npm-api.d.ts and cli/types/cypress.d.ts #23010
Comments
@mirobo thanks for the ticket. I believe the current typing indicates our desired usage, which would be to nest the
It's a little verbose, as you're already specifying the |
Thanks for the hint. But I wonder why it works if it's wrong. I fixed it in my project. config.e2e shows these options (and they work): but the documentation shows only couple of options:
|
@mirobo ah yeah, I can confirm your findings here. 1 and 2: I believe some typings are being reused here without the expected omits, which is very confusing. Especially so because as you said the values work in both locations. We can do better here. 3: It does appear |
Point 3 is already adressed here #22146 |
Is this still an issue in 13.x versions? We made some updates to typings. |
I didn't check it yet. I'm closing the issue and I'd reopen a new one if still relevant. First we'll need to check if the Cypress Gateway Connector still let's us use sorry-cypress with 13.x (I know it should!). On a side note: |
Current behavior
When using Cypress NPM API, i.e. cypress.run(..) or cypress.open(..) the parameter "specPattern" inside "config" does not exist. Yet it can be used and it actually works :-)
Please don't change that it works :-P
The error was introduced here: 54f3b90#diff-9fde1fb2f7eaba5ea49b585c811461495bfbba88e614e900a96863ecfe6b980aR2985
Not quite sure why the UserConfigOptions are omitting excludeSpecPattern and specPattern (personally I don't care about supportFile, but if it works, it should not be omitted). Same goes for baseUrl.
I think it would be helpful to A) clean wrong omissions and maybe don't maintain two "sources of truth" for which parameters are possible: https://docs.cypress.io/guides/guides/module-api
I'd rather like to see just an automatically generated list of options, derived from the type UserConfigOptions<ComponentDevServerOpts = any> ? But this is probably something cypress-documentation should think about :D. If the type is correct I'm happy but the documentation should be up to date.
Desired behavior
Fixed types
Test code to reproduce
n/a
Cypress Version
10.3.1
Other
No response
The text was updated successfully, but these errors were encountered: