-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Description
What would you like?
I want to be able to do this:
Cypress.Commands.add({
myCommand(arg) {
// ...
},
myOtherCommand(arg) {
// ...
}
});Why is this needed?
This way we can maintain a commands.js file that looks like this:
export function myCommand(arg) {
// ...
}
export function myOtherCommand(arg) {
// ...
}And we can add them all like this:
import * as commands from './commands';
Cypress.Commands.add(commands);Other
This will be especially useful for typescript where declaring the function separately from the Cypress.Commands.add(...) call is helpful for maintaining correct typing in Cypress.Chainable.
Metadata
Metadata
Assignees
Labels
No labels