diff --git a/examples/fundamentals__add-custom-command/README.md b/examples/fundamentals__add-custom-command/README.md index d3e50701f..c12e0a02f 100644 --- a/examples/fundamentals__add-custom-command/README.md +++ b/examples/fundamentals__add-custom-command/README.md @@ -11,7 +11,9 @@ You write Cypress custom command, for example for selecting DOM elements by `dat * * @example cy.dataCy('greeting') */ -Cypress.Commands.add('dataCy', (value) => cy.get(`[data-cy=${value}]`)) +Cypress.Commands.add('dataCy', (value) => { + cy.get(`[data-cy=${value}]`) +}) ``` Yet, TypeScript compiler and IntelliSense do not understand that you have added a new method to the global `cy` object.