developerasun / myCodeBox-web

Open source code box for web developers.
Apache License 2.0
5 stars 0 forks source link

React testin library : Unable to find an accessible element with the role "paragraph" #123

Open developerasun opened 2 years ago

developerasun commented 2 years ago

issue : React testing library couldn't find a paragraph with getByRole method

in terminal,

image

in codes,

test("should render the correct amount of incomplete test", () => {
    render(<TestingTodoFooter incompleTasks={1}/>)
    const paragraphElement = screen.getByRole("paragraph")
    expect(paragraphElement).toBeInTheDocument()
}) 
developerasun commented 2 years ago

research : read these