Skip to content

Commit 66ba0c7

Browse files
Update projects/testing-library/tests/rerender.spec.ts
Co-authored-by: Tim Deschryver <[email protected]>
1 parent e4acbbd commit 66ba0c7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

projects/testing-library/tests/rerender.spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ test('rerenders the component with updated props and resets other props', async
6262
const firstName2 = 'Chris';
6363
await rerender({ componentProperties: { firstName: firstName2 } });
6464

65-
expect(screen.getByText(`${firstName2}`)).toBeInTheDocument();
66-
expect(screen.queryByText(`${firstName2} ${lastName}`)).not.toBeInTheDocument();
67-
expect(screen.queryByText(`${firstName} ${lastName}`)).not.toBeInTheDocument();
65+
expect(screen.getByText(firstName2)).toBeInTheDocument();
66+
expect(screen.queryByText(firstName)).not.toBeInTheDocument();
67+
expect(screen.queryByText(lastName)).not.toBeInTheDocument();
6868

6969
expect(ngOnChangesSpy).toHaveBeenCalledTimes(2); // one time initially and one time for rerender
7070
const rerenderedChanges = ngOnChangesSpy.mock.calls[1][0] as SimpleChanges;

0 commit comments

Comments
 (0)