aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/component-measures
diff options
context:
space:
mode:
authorPhilippe Perrin <philippe.perrin@sonarsource.com>2022-10-19 14:46:14 +0200
committersonartech <sonartech@sonarsource.com>2022-10-21 20:03:18 +0000
commit8a3b8052254c1198495ef26abc024d26917bdef0 (patch)
treefb3621f0caa3ee1c9690ab309b10049302a0a648 /server/sonar-web/src/main/js/apps/component-measures
parent067e6587f1423b9b14cc7094422d47971c734764 (diff)
downloadsonarqube-8a3b8052254c1198495ef26abc024d26917bdef0.tar.gz
sonarqube-8a3b8052254c1198495ef26abc024d26917bdef0.zip
[NO-JIRA] Fix eslint errors
Diffstat (limited to 'server/sonar-web/src/main/js/apps/component-measures')
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/__tests__/App-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureOverview-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureViewSelect-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/FilesView-test.tsx8
4 files changed, 7 insertions, 7 deletions
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/App-test.tsx
index 61d1a6ab94e..802f3d49598 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/App-test.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/App-test.tsx
@@ -113,7 +113,7 @@ it('should refresh branch status if issues are updated', async () => {
await waitAndUpdate(wrapper);
instance.handleIssueChange(mockIssue());
- expect(fetchBranchStatus).toBeCalledWith(branchLike, 'foo');
+ expect(fetchBranchStatus).toHaveBeenCalledWith(branchLike, 'foo');
});
it('should render a warning message when user does not have access to all projects whithin a Portfolio', async () => {
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureOverview-test.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureOverview-test.tsx
index e1b81422281..4b2a4b71b2e 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureOverview-test.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureOverview-test.tsx
@@ -63,7 +63,7 @@ it('should correctly enhance leaf components', async () => {
const updateLoading = jest.fn();
const wrapper = shallowRender({ updateLoading });
- expect(updateLoading).toBeCalledWith({ bubbles: true });
+ expect(updateLoading).toHaveBeenCalledWith({ bubbles: true });
expect(getComponentLeaves).toHaveBeenCalledWith(
'foo',
[
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureViewSelect-test.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureViewSelect-test.tsx
index 2bb5a708616..bedfb920a37 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureViewSelect-test.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureViewSelect-test.tsx
@@ -40,7 +40,7 @@ it('should correctly trigger a selection change', () => {
const handleViewChange = jest.fn();
const wrapper = shallowRender({ handleViewChange });
wrapper.instance().handleChange({ icon: <ListIcon />, label: 'List View', value: 'list' });
- expect(handleViewChange).toBeCalledWith('list');
+ expect(handleViewChange).toHaveBeenCalledWith('list');
});
function shallowRender(props: Partial<MeasureViewSelect['props']> = {}) {
diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/FilesView-test.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/FilesView-test.tsx
index 1d10df5fa23..3a772b9fea6 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/FilesView-test.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/FilesView-test.tsx
@@ -87,16 +87,16 @@ it('should correctly bind key events for file navigation', () => {
});
keydown({ key: KeyboardKeys.DownArrow });
- expect(handleSelect).toBeCalledWith(FILES[0]);
+ expect(handleSelect).toHaveBeenCalledWith(FILES[0]);
keydown({ key: KeyboardKeys.UpArrow });
- expect(handleSelect).toBeCalledWith(FILES[2]);
+ expect(handleSelect).toHaveBeenCalledWith(FILES[2]);
keydown({ key: KeyboardKeys.RightArrow, ctrlKey: true });
- expect(handleOpen).not.toBeCalled();
+ expect(handleOpen).not.toHaveBeenCalled();
keydown({ key: KeyboardKeys.RightArrow });
- expect(handleOpen).toBeCalled();
+ expect(handleOpen).toHaveBeenCalled();
});
function shallowRender(props: Partial<FilesView['props']> = {}) {