overleaf/services/web/cypress/support/ct/commands/index.ts

17 lines
490 B
TypeScript
Raw Normal View History

import { mount, unmount } from 'cypress/react' // NOTE: not '@cypress/react'?
// eslint-disable-next-line no-unused-vars,@typescript-eslint/no-namespace
declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace,no-unused-vars
namespace Cypress {
// eslint-disable-next-line no-unused-vars
interface Chainable {
mount: typeof mount
unmount: typeof unmount
}
}
}
Cypress.Commands.add('mount', mount)
Cypress.Commands.add('unmount', unmount)