-
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
TS2345 error: testIsolation not in cypress.d.ts -> TestConfigOverrides #23911
Comments
Thanks for opening the issue @rafal-pomocnik-captivateiq, I can verify that our types aren't properly reflecting this option. A change will need to be made here to the If you're interested in contributing, we would appreciate a PR! |
@ZachJW34 both Or just extend |
The latter is the easiest, looks like we don't have a pattern for suite level vs test level but like you said we do throw an error if provided. A simple |
Cool, thanks @ZachJW34! I have some code prepared, but it seems I lack perms to push branch to remote - can you advise? 🙏 |
@rafal-pomocnik-captivateiq We have a contributing guide that I would recommend going through. Then, you can fork the repo and contribute a PR from the forked repo. Glad you're looking to fix it, we appreciate it! |
The code for this is done in cypress-io/cypress#24603, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior
When trying to use
testIsolation
option in test suite at describe level like mentioned in https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests.html#Test-Isolation, typescript check marks it with below error:TS2345: Argument of type '{ testIsolation: string; }' is not assignable to parameter of type 'TestConfigOverrides'. Object literal may only specify known properties, and 'testIsolation' does not exist in type 'TestConfigOverrides'.
Even though - it is working fine when
testIsolation:'strict'
is added there and it utilizes this function properly.Desired behavior
tsc
usingcypress.d.ts
not complaining about it.Test code to reproduce
Cypress Version
10.8.0
Node version
v16.14.0
Operating System
macOS 12.6
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: