Skip to content

Commit

Permalink
Revert "Add utilities test"
Browse files Browse the repository at this point in the history
This reverts commit b11f594.
  • Loading branch information
amrocha committed Jun 22, 2019
1 parent b11f594 commit 776d652
Showing 1 changed file with 1 addition and 39 deletions.
40 changes: 1 addition & 39 deletions src/components/DataTable/tests/DataTable.test.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import * as React from 'react';
import {mountWithAppProvider, findByTestID} from 'test-utilities';
import {
isEdgeVisible,
getPrevAndCurrentColumns,
measureColumn,
} from '../utilities';
import {isEdgeVisible, getPrevAndCurrentColumns} from '../utilities';
import {Cell, Navigation} from '../components';
import DataTable, {Props} from '../DataTable';

Expand Down Expand Up @@ -186,38 +182,4 @@ describe('<DataTable />', () => {
expect(actualMeasurement).toStrictEqual(expectedMeasurement);
});
});

describe('measureColumn()', () => {
it('returns the calculated measurements', () => {
const tableData = {
fixedColumnWidth: 145,
firstVisibleColumnIndex: 0,
tableLeftVisibleEdge: 145,
tableRightVisibleEdge: 444,
};

const measurementFunction = measureColumn(tableData);

[
[
{offsetLeft: 0, offsetWidth: 91},
{leftEdge: 145, rightEdge: 236, isVisible: true},
],
[
{offsetLeft: 91, offsetWidth: 121},
{leftEdge: 236, rightEdge: 357, isVisible: true},
],
[
{offsetLeft: 212, offsetWidth: 117},
{leftEdge: 357, rightEdge: 474, isVisible: true},
],
[
{offsetLeft: 329, offsetWidth: 124},
{leftEdge: 474, rightEdge: 598, isVisible: false},
],
].forEach((tuple, index) =>
expect(measurementFunction(tuple[0], index)).toStrictEqual(tuple[1]),
);
});
});
});

0 comments on commit 776d652

Please sign in to comment.