forked from enviPath/enviPy
Current Dev State
This commit is contained in:
20
static/js/ketcher2/node_modules/table/test/calculateCellWidthIndex.js
generated
vendored
Normal file
20
static/js/ketcher2/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