Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 499 Bytes

File metadata and controls

13 lines (9 loc) · 499 Bytes

add custom command in TypeScript

Write your own Cypress commands using TypeScript

In this recipe we do not use tsconfig.json file, thus we need to specify additional command types using /// <reference ...> commands, like this:

// cypress/e2e/spec.ts
/// <reference path="../support/index.d.ts" />

IntelliSense for custom command cy.dataCy

See cypress/support/e2e.ts and cypress/support/index.d.ts.