mirror of
https://github.com/thangisme/notes.git
synced 2025-11-23 13:12:25 -05:00
Initial commit
This commit is contained in:
20
node_modules/table/test/calculateCellWidthIndex.js
generated
vendored
Normal file
20
node_modules/table/test/calculateCellWidthIndex.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
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');
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user