diff --git a/src/TestComponent/TestComponent.test.tsx b/src/TestComponent/TestComponent.test.tsx index 35b8aa3..6e3d22c 100644 --- a/src/TestComponent/TestComponent.test.tsx +++ b/src/TestComponent/TestComponent.test.tsx @@ -25,7 +25,7 @@ describe("TestComponent", () => { it("should render content correctly", () => { const { getByTestId } = renderComponent({ - content:
I am test content
+ content:
I am test content
, }); expect( @@ -33,5 +33,10 @@ describe("TestComponent", () => { "some-test-content" ) ).toBeInTheDocument(); + expect( + within(getByTestId("test-component__content")).queryByTestId( + "some-test-content" + ) + ).toHaveTextContent("I am test content"); }); });