Skip to content

[v15] cy.exec return type incorrect, code should be renamed to exitCode #32875

@andrew-pledge-io

Description

@andrew-pledge-io

Current behavior

cy.exec() yields a response of type Exec, defined here: https://github.com/cypress-io/cypress/blob/0dd24273cd21b79085bd00b7823846073dd81363/cli/types/cypress.d.ts#L6478C1-L6483C1

Exec has a property named code of type number. This was renamed to exitCode in v15: https://docs.cypress.io/app/references/migration-guide#cyexec-code-property-renamed

Desired behavior

Exec property code should be renamed to exitCode

Test code to reproduce

cy.exec('echo 0').then(({ exitCode }) => { cy.log(`${exitCode}`) });

Cypress Version

15.0.0

Debug Logs

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: typingsIssue related to Cypress types (for TypeScript)v15.0.0 🐛Issues introduced in 15.0.0

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions