From 12182960f421a5ca37ca21fdd15999000f31952c Mon Sep 17 00:00:00 2001 From: Mike Ball Date: Fri, 4 Feb 2022 08:21:30 -0500 Subject: [PATCH] address TypeScript compilation failure This fixes... ``` Run yarn tsc yarn run v1.22.1 $ tsc plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.test.tsx:158:26 - error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'Matcher'. Type 'undefined' is not assignable to type 'Matcher'. 158 expect(getByText(MOCK_INCIDENT.entityDisplayName)).toBeInTheDocument(), ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` Signed-off-by: Mike Ball --- .../src/components/EntitySplunkOnCallCard.test.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.test.tsx b/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.test.tsx index 9c16752421..da248ebec0 100644 --- a/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.test.tsx +++ b/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.test.tsx @@ -154,8 +154,7 @@ describe('SplunkOnCallCard', () => { await waitFor(() => !queryByTestId('progress')); expect(getByText(`Team: ${MOCK_TEAM.name}`)).toBeInTheDocument(); await waitFor( - () => - expect(getByText(MOCK_INCIDENT.entityDisplayName)).toBeInTheDocument(), + () => expect(getByText('test-incident')).toBeInTheDocument(), { timeout: 2000 }, ); });