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

fix: Add typing for specType field on spec method #8256

Merged
10 changes: 10 additions & 0 deletions cli/types/cypress.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,14 @@ declare namespace Cypress {
fromAutWindow: WindowPosition & { x: number, y: number }
}

/**
* Spec type for the given test. "integration" is the default, but
* tests run using experimentalComponentTesting will be "component"
*
* @see https://on.cypress.io/experiments
*/
type CypressSpecType = "integration" | "component"

/**
* Window type for Application Under Test(AUT)
*/
Expand Down Expand Up @@ -221,6 +229,7 @@ declare namespace Cypress {
// name: "config_passing_spec.coffee",
// relative: "cypress/integration/config_passing_spec.coffee",
// absolute: "/users/smith/projects/web/cypress/integration/config_passing_spec.coffee"
// specType: "integration"
// }
```
*/
Expand All @@ -229,6 +238,7 @@ declare namespace Cypress {
relative: string // "cypress/integration/config_passing_spec.coffee" or "__all" if clicked all specs button
absolute: string
specFilter?: string // optional spec filter used by the user
specType: CypressSpecType
jennifer-shehane marked this conversation as resolved.
Show resolved Hide resolved
}

/**
Expand Down