Updated to airbnb coding styles

This commit is contained in:
Alejandro Celaya
2022-03-26 12:17:42 +01:00
parent 4e9b19afd1
commit a2df486280
239 changed files with 2210 additions and 3549 deletions

View File

@@ -39,16 +39,16 @@ describe('<HorizontalBarChart />', () => {
});
it.each([
[{ foo: 23 }, [ 100, 456 ], [ 23, 0 ]],
[{ foo: 50 }, [ 73, 456 ], [ 50, 0 ]],
[{ bar: 45 }, [ 123, 411 ], [ 0, 45 ]],
[{ bar: 20, foo: 13 }, [ 110, 436 ], [ 13, 20 ]],
[ undefined, [ 123, 456 ], undefined ],
[{ foo: 23 }, [100, 456], [23, 0]],
[{ foo: 50 }, [73, 456], [50, 0]],
[{ bar: 45 }, [123, 411], [0, 45]],
[{ bar: 20, foo: 13 }, [110, 436], [13, 20]],
[undefined, [123, 456], undefined],
])('splits highlighted data from regular data', (highlightedStats, expectedData, expectedHighlightedData) => {
wrapper = shallow(<HorizontalBarChart stats={stats} highlightedStats={highlightedStats} />);
const horizontal = wrapper.find(Bar);
const { datasets: [{ data, label }, highlightedData ] } = horizontal.prop('data') as any;
const { datasets: [{ data, label }, highlightedData] } = horizontal.prop('data') as any;
expect(label).toEqual('Visits');
expect(data).toEqual(expectedData);