From 4922f11fe3d35607201b41fcc51e37fe57b7453c Mon Sep 17 00:00:00 2001 From: Emma Indal Date: Mon, 7 Feb 2022 14:33:12 +0100 Subject: [PATCH] update type from JSX.Element or string to ReactNode + add test for string based prop Signed-off-by: Emma Indal --- .../src/layout/ErrorPage/ErrorPage.test.tsx | 16 ++++++++++++++++ .../src/layout/ErrorPage/ErrorPage.tsx | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/core-components/src/layout/ErrorPage/ErrorPage.test.tsx b/packages/core-components/src/layout/ErrorPage/ErrorPage.test.tsx index 57d0ba34a1..2efdc5da33 100644 --- a/packages/core-components/src/layout/ErrorPage/ErrorPage.test.tsx +++ b/packages/core-components/src/layout/ErrorPage/ErrorPage.test.tsx @@ -32,6 +32,22 @@ describe('', () => { expect(getByTestId('go-back-link')).toBeInTheDocument(); }); + it('should render with additional information of type string', async () => { + const { getByText } = await renderInTestApp( + , + ); + expect( + getByText(/looks like someone dropped the mic!/i), + ).toBeInTheDocument(); + expect( + getByText(/This is a string based additional information/i), + ).toBeInTheDocument(); + }); + it('should render with additional information including link', async () => { const { getByText } = await renderInTestApp(