overleaf/services/web/cypress/support/ct/commands/index.ts
Alf Eaton 716f186fed Upgrade Cypress to v10 (#8322)
GitOrigin-RevId: 856c523a4ca34f8ccdc38067cef6fcd8a5c20250
2022-06-08 08:03:35 +00:00

16 lines
490 B
TypeScript

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)