Answers for "cypress with typescript"

0

cypress with typescript

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