0

I'm trying to set up tests with Cypress inside my React / TS app. I installed the package, and when I try to set up a test I get an error:

Test:

it("displays Text component", () => {
    cy.mount(<Text tag="h1" data-testid="Hello">Hello World</Text>)
    cy.get("[data-testid='Hello']").should("contain.text", "Hello")
})

And the error:

Property 'get' does not exist on type 'typeof import("path/to/package")'.

Why does this happen? Did I install something wrong?

Mads Brugger
  • 242
  • 9
JulSeb42
  • 157
  • 1
  • 9

0 Answers0