Answers for "cypress typescript example"

0

cypress typescript example

yarn add --dev typescript


// tsconfig.json
{
  "compilerOptions": {
    "target": "es5",
    "lib": ["es5", "dom"],
    "types": ["cypress"]
  },
  "include": ["**/*.ts"]
}

//example

Cypress.Commands.add('dataCy', (value) => {
  return cy.get(`[data-cy=${value}]`)
})
Posted by: Guest on May-08-2022

Code answers related to "TypeScript"

Browse Popular Code Answers by Language