Sha256: c35c528414982ce4eec3173e86fdfdc8140d8f9a28f1a17f5c522deb1a5075ac

Contents?: true

Size: 570 Bytes

Versions: 46

Compression:

Stored size: 570 Bytes

Contents

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');
    });
  });
});

Version data entries

46 entries across 46 versions & 3 rubygems

Version Path
govuk_publishing_components-18.0.0 node_modules/table/test/calculateCellWidthIndex.js
govuk_publishing_components-17.21.0 node_modules/table/test/calculateCellWidthIndex.js
govuk_publishing_components-17.20.0 node_modules/table/test/calculateCellWidthIndex.js
govuk_publishing_components-17.19.1 node_modules/table/test/calculateCellWidthIndex.js
govuk_publishing_components-17.19.0 node_modules/table/test/calculateCellWidthIndex.js
govuk_publishing_components-17.18.0 node_modules/table/test/calculateCellWidthIndex.js
govuk_publishing_components-17.17.0 node_modules/table/test/calculateCellWidthIndex.js
govuk_publishing_components-17.16.0 node_modules/table/test/calculateCellWidthIndex.js
govuk_publishing_components-17.15.0 node_modules/table/test/calculateCellWidthIndex.js
govuk_publishing_components-17.14.0 node_modules/table/test/calculateCellWidthIndex.js
govuk_publishing_components-17.13.0 node_modules/table/test/calculateCellWidthIndex.js
govuk_publishing_components-17.12.2 node_modules/table/test/calculateCellWidthIndex.js
govuk_publishing_components-17.12.1 node_modules/table/test/calculateCellWidthIndex.js
govuk_publishing_components-17.12.0 node_modules/table/test/calculateCellWidthIndex.js
govuk_publishing_components-17.11.0 node_modules/table/test/calculateCellWidthIndex.js
govuk_publishing_components-17.10.0 node_modules/table/test/calculateCellWidthIndex.js
govuk_publishing_components-17.9.0 node_modules/table/test/calculateCellWidthIndex.js
govuk_publishing_components-17.8.0 node_modules/table/test/calculateCellWidthIndex.js
govuk_publishing_components-17.7.0 node_modules/table/test/calculateCellWidthIndex.js
govuk_publishing_components-17.6.1 node_modules/table/test/calculateCellWidthIndex.js