From 66ba0c79048c831d5bd3836dc3db335f3b8e19d8 Mon Sep 17 00:00:00 2001 From: Torsten Knauf Date: Tue, 21 Feb 2023 21:26:04 +0100 Subject: [PATCH] Update projects/testing-library/tests/rerender.spec.ts Co-authored-by: Tim Deschryver <28659384+timdeschryver@users.noreply.github.com> --- projects/testing-library/tests/rerender.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/testing-library/tests/rerender.spec.ts b/projects/testing-library/tests/rerender.spec.ts index ca95fa4..bd1a063 100644 --- a/projects/testing-library/tests/rerender.spec.ts +++ b/projects/testing-library/tests/rerender.spec.ts @@ -62,9 +62,9 @@ test('rerenders the component with updated props and resets other props', async const firstName2 = 'Chris'; await rerender({ componentProperties: { firstName: firstName2 } }); - expect(screen.getByText(`${firstName2}`)).toBeInTheDocument(); - expect(screen.queryByText(`${firstName2} ${lastName}`)).not.toBeInTheDocument(); - expect(screen.queryByText(`${firstName} ${lastName}`)).not.toBeInTheDocument(); + expect(screen.getByText(firstName2)).toBeInTheDocument(); + expect(screen.queryByText(firstName)).not.toBeInTheDocument(); + expect(screen.queryByText(lastName)).not.toBeInTheDocument(); expect(ngOnChangesSpy).toHaveBeenCalledTimes(2); // one time initially and one time for rerender const rerenderedChanges = ngOnChangesSpy.mock.calls[1][0] as SimpleChanges;