Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sdadn committed Jan 10, 2024
1 parent 958ea9b commit 4c61a87
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions packages/carbon-graphs/tests/unit/controls/Line/Line.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('Line', () => {
graphDefault = new Graph(getAxes(axisDefault));
});
afterEach(() => {
graphDefault.destroy()
graphDefault.destroy();
});

it('initializes properly', () => {
Expand Down Expand Up @@ -65,7 +65,7 @@ describe('Line', () => {
it.skip('display the legend when values are provided', () => {
const input = getInput(valuesDefault);
graphDefault.loadContent(new Line(input));
const legendContainer = fetchElementByClass( lineGraphContainer, styles.legend, );
const legendContainer = fetchElementByClass(lineGraphContainer, styles.legend);

const legendItems = legendContainer.children;
expect(legendContainer).not.toBeNull();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ describe.skip('Line - Panning', () => {
},
],
};
let lineContent = fetchAllElementsByClass( lineGraphContainer, styles.pointGroup);
let lineContent = fetchAllElementsByClass(lineGraphContainer, styles.pointGroup);
expect(lineContent.length).toEqual(3);
graphDefault.reflowMultipleDatasets(graphData);
lineContent = fetchAllElementsByClass( lineGraphContainer, styles.pointGroup);
lineContent = fetchAllElementsByClass(lineGraphContainer, styles.pointGroup);
expect(lineContent.length).toEqual(2);
const axisLabelX = fetchElementByClass( lineGraphContainer, styles.axisLabelX);
const axisLabelY = fetchElementByClass( lineGraphContainer, styles.axisLabelY);
const axisLabelY2 = fetchElementByClass( lineGraphContainer, styles.axisLabelY2);
const axisLabelX = fetchElementByClass(lineGraphContainer, styles.axisLabelX);
const axisLabelY = fetchElementByClass(lineGraphContainer, styles.axisLabelY);
const axisLabelY2 = fetchElementByClass(lineGraphContainer, styles.axisLabelY2);
expect(axisLabelX.querySelector('text').textContent).toBe('X Label');
expect(axisLabelY.querySelector('text').textContent).toBe('Y Label');
expect(axisLabelY2.querySelector('text').textContent).toBe('Y2 Label');
Expand Down Expand Up @@ -155,10 +155,10 @@ describe.skip('Line - Panning', () => {
},
],
};
let lineContent = fetchAllElementsByClass( lineGraphContainer, styles.pointGroup);
let lineContent = fetchAllElementsByClass(lineGraphContainer, styles.pointGroup);
expect(lineContent.length).toEqual(3);
graphDefault.reflowMultipleDatasets(graphData);
lineContent = fetchAllElementsByClass( lineGraphContainer, styles.pointGroup);
lineContent = fetchAllElementsByClass(lineGraphContainer, styles.pointGroup);
expect(lineContent.length).toEqual(3);
});
describe('when there is no data', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ describe.skip('Line - Region', () => {
expect(regionElement.getAttribute('aria-hidden')).toBe('false');
});
it('gives value region precedence over legend level regions', () => {
let regionGroupElement = null;
data = utils.deepClone(getInput(values, false, false));
data.regions = [
{
Expand All @@ -110,7 +109,7 @@ describe.skip('Line - Region', () => {
];
line = new Line(data);
graphDefault.loadContent(line);
regionGroupElement = fetchElementByClass(lineGraphContainer, styles.regionGroup);
const regionGroupElement = fetchElementByClass(lineGraphContainer, styles.regionGroup);
const regionElement = fetchElementByClass(regionGroupElement, styles.region);
expect(regionGroupElement.childNodes.length).toBe(1);
expect(regionElement.nodeName).toBe('path');
Expand All @@ -126,7 +125,7 @@ describe.skip('Line - Region', () => {
};
line = new Line(getInput(values, false, false));
graphDefault.loadContent(line);
regionGroupElement = fetchElementByClass(lineGraphContainer, styles.regionGroup);
const regionGroupElement = fetchElementByClass(lineGraphContainer, styles.regionGroup);
expect(regionGroupElement.childNodes.length).toBe(2);
});
it('splits to multiple area if there is a region with different color', () => {
Expand All @@ -137,7 +136,7 @@ describe.skip('Line - Region', () => {
};
line = new Line(getInput(values, false, false));
graphDefault.loadContent(line);
regionGroupElement = fetchElementByClass(lineGraphContainer, styles.regionGroup);
const regionGroupElement = fetchElementByClass(lineGraphContainer, styles.regionGroup);
expect(regionGroupElement.childNodes.length).toBe(2);
});
});
Expand Down

0 comments on commit 4c61a87

Please sign in to comment.