https://cypress.io logo
Cypress component testing- TS not happy!
# i-need-help
r
I think I have the mount command setup and typed... Trying to import a React component and pass props, but I can't get TS to cooperate. Any help.advice much appreciated. TS is saying it "can't find name [name of of one of my props]."
Copy code
import Sparkline from "./Sparkline";

describe('Sparkline', () => {
  it('Displays correct stat trend', () => {
    cy.mount(
      <Sparkline
        description="foo"
        data={[]}
        previousData={[]}
        valueFunction={()=> 2}
      />
    );
    
  });
});

export {};
file extension was not tsx!!
g
// @ts-ignore
4 Views