1
0
mirror of https://github.com/thangisme/notes.git synced 2024-11-01 01:27:31 -04:00
notes/node_modules/table/test/calculateCellWidthIndex.js
Patrick Marsceill b7b0d0d7bf
Initial commit
2017-03-09 13:16:08 -05:00

21 lines
570 B
JavaScript

import {
expect
} from 'chai';
import calculateCellWidthIndex from './../src/calculateCellWidthIndex';
describe('calculateCellWidthIndex', () => {
context('all cells have different width', () => {
it('describes each cell contents width', () => {
const cellWidthIndex = calculateCellWidthIndex([
'a',
'aaa',
'aaaaaa'
]);
expect(cellWidthIndex[0]).to.equal(1, 'first column');
expect(cellWidthIndex[1]).to.equal(3, 'second column');
expect(cellWidthIndex[2]).to.equal(6, 'third column');
});
});
});