mirror of
https://github.com/cypress-io/cypress.git
synced 2026-04-22 23:20:24 -05:00
chore: fix types for modifyObstructiveCode (#23694)
* chore: fix types for modifyObstructiveCode * add test
This commit is contained in:
Vendored
+7
-7
@@ -2720,6 +2720,13 @@ declare namespace Cypress {
|
||||
* @default 60000
|
||||
*/
|
||||
pageLoadTimeout: number
|
||||
/**
|
||||
* Whether Cypress will search for and replace
|
||||
* obstructive JS code in .js or .html files.
|
||||
*
|
||||
* @see https://on.cypress.io/configuration#modifyObstructiveCode
|
||||
*/
|
||||
modifyObstructiveCode: boolean
|
||||
/**
|
||||
* Time, in milliseconds, to wait for an XHR request to go out in a [cy.wait()](https://on.cypress.io/wait) command
|
||||
* @default 5000
|
||||
@@ -2968,13 +2975,6 @@ declare namespace Cypress {
|
||||
* Whether Cypress was launched via 'cypress open' (interactive mode)
|
||||
*/
|
||||
isInteractive: boolean
|
||||
/**
|
||||
* Whether Cypress will search for and replace
|
||||
* obstructive JS code in .js or .html files.
|
||||
*
|
||||
* @see https://on.cypress.io/configuration#modifyObstructiveCode
|
||||
*/
|
||||
modifyObstructiveCode: boolean
|
||||
/**
|
||||
* The platform Cypress is running on.
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// type tests for Cypress NPM module
|
||||
// https://on.cypress.io/module-api
|
||||
import cypress from 'cypress'
|
||||
import cypress, { defineConfig } from 'cypress'
|
||||
|
||||
cypress.run // $ExpectType (options?: Partial<CypressRunOptions> | undefined) => Promise<CypressRunResult | CypressFailedRunResult>
|
||||
cypress.open // $ExpectType (options?: Partial<CypressOpenOptions> | undefined) => Promise<void>
|
||||
@@ -51,6 +51,10 @@ cypress.run().then(results => {
|
||||
}
|
||||
})
|
||||
|
||||
const config = defineConfig({
|
||||
modifyObstructiveCode: true
|
||||
})
|
||||
|
||||
// component options
|
||||
const componentConfigNextWebpack: Cypress.ConfigOptions = {
|
||||
component: {
|
||||
|
||||
Reference in New Issue
Block a user