UNPKG

e-lado

Version:

[![CircleCI](https://circleci.com/gh/sharetribe/sharetribe/tree/master.svg?style=svg)](https://circleci.com/gh/sharetribe/sharetribe/tree/master) [![Dependency Status](https://gemnasium.com/sharetribe/sharetribe.png)](https://gemnasium.com/sharetribe/shar

21 lines (18 loc) 570 B
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'); }); }); });