Drapegnik/react-grid

View on GitHub
src/components/Table/Table.test.jsx

Summary

Maintainability
C
1 day
Test Coverage

Showing 3 of 3 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

const tableData = {
columns: [{ name: 'first' }, { name: 'second' }, { name: 'third' }],
data: [
{
id: 101,
Severity: Major
Found in src/components/Table/Table.test.jsx and 1 other location - About 3 hrs to fix
src/stories/index.jsx on lines 22..42

Similar blocks of code found in 2 locations. Consider refactoring.
Open

it('Should be rendered an empty without columns and data', () => {
expect(wrapper.find('table').length).toEqual(1);
expect(wrapper.find('tbody tr').length).toEqual(0);
expect(wrapper.find('thead tr th').length).toEqual(0);
});
Severity: Major
Found in src/components/Table/Table.test.jsx and 1 other location - About 2 hrs to fix
src/components/Table/Table.test.jsx on lines 66..70

Similar blocks of code found in 2 locations. Consider refactoring.
Open

it('Should be rendered with 4 columns and 3 rows', () => {
expect(wrapper.find('table').length).toEqual(1);
expect(wrapper.find('tbody tr').length).toEqual(3);
expect(wrapper.find('thead tr th').length).toEqual(4);
});
Severity: Major
Found in src/components/Table/Table.test.jsx and 1 other location - About 2 hrs to fix
src/components/Table/Table.test.jsx on lines 13..17

There are no issues that match your filters.

Category
Status