Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML title property of the main heading is hardcoded as "Header" #17

Open
chaitanyathengdi opened this issue Sep 3, 2022 · 0 comments · May be fixed by #18
Open

HTML title property of the main heading is hardcoded as "Header" #17

chaitanyathengdi opened this issue Sep 3, 2022 · 0 comments · May be fixed by #18

Comments

@chaitanyathengdi
Copy link

Wrote a test for your app like this:

  it("shows HTML title that's passed from parent component", () => {
    render(<Header title="test-title" />);
    const header = screen.getByRole("heading");
    expect(header.title).toBe("test-title");
  })

returns the output:

  ● Header › shows HTML title that's passed from parent component

    expect(received).toBe(expected) // Object.is equality

    Expected: "test-title"
    Received: "Header"

      25 |     render(<Header title="test-title" />);
      26 |     const header = screen.getByRole("heading");
    > 27 |     expect(header.title).toBe("test-title");
         |                          ^
      28 |   })
      29 | })
      30 |

And this shows in the app: when you hover over either the Todo or the Followers heading, you get the title as Header.

@chaitanyathengdi chaitanyathengdi linked a pull request Sep 3, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant