From 4c9193c384e407d50008be8ce30bf65cd629173a Mon Sep 17 00:00:00 2001 From: Neemys <36508659+Neemys@users.noreply.github.com> Date: Mon, 1 Aug 2022 17:37:24 +0200 Subject: [PATCH] Fix more forgotten use of recent API change in `sonarqube-backend` plugin Signed-off-by: Neemys <36508659+Neemys@users.noreply.github.com> --- .../sonarqube-backend/src/service/router.test.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/plugins/sonarqube-backend/src/service/router.test.ts b/plugins/sonarqube-backend/src/service/router.test.ts index 6b42e745be..426066d897 100644 --- a/plugins/sonarqube-backend/src/service/router.test.ts +++ b/plugins/sonarqube-backend/src/service/router.test.ts @@ -70,10 +70,10 @@ describe('createRouter', () => { }) .send(); expect(getFindingsMock).toBeCalledTimes(1); - expect(getFindingsMock).toBeCalledWith( - DUMMY_COMPONENT_KEY, - DUMMY_INSTANCE_KEY, - ); + expect(getFindingsMock).toBeCalledWith({ + componentKey: DUMMY_COMPONENT_KEY, + instanceName: DUMMY_INSTANCE_KEY, + }); expect(response.status).toEqual(200); expect(response.body).toEqual(measures); }); @@ -104,7 +104,10 @@ describe('createRouter', () => { .send(); expect(getFindingsMock).toBeCalledTimes(1); - expect(getFindingsMock).toBeCalledWith(DUMMY_COMPONENT_KEY, undefined); + expect(getFindingsMock).toBeCalledWith({ + componentKey: DUMMY_COMPONENT_KEY, + instanceName: undefined, + }); expect(response.status).toEqual(200); expect(response.body).toEqual(measures); });