I started a new project with yarn and added TypeScript and cypress as dependencies. I created an example test with a custom command. The test is in file cypress/e2e/cypress/example.cy.ts and reads:
describe('Example', () => {
it('example', () => {
cy.myCommand();
})
})
The command is in cypress/e2e/cypress/support/commands.ts and reads:
Cypress.Commands.add('myCommand', () => {
cy.visit('https://example.cypress.io')
})
When I run this in Cypress, my test fails with the following error: "cy.myCommand is not a function". How can I configure my tests correctly?
I am using Cypress 13.6.5.
index.tsbecause that file was not generated by Cypress likee2e.ts. Furthermore I did not know where to putindex.ts.