"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

var _react = _interopRequireDefault(require("react"));

var _enzyme = require("enzyme");

var _ = _interopRequireDefault(require("."));

describe('Table', function () {
  it('displays a data table', function () {
    var mock = {
      head: [['Col 1', 'Col 2', 'Col 3']],
      body: [['A1', 'A2', 'A3'], ['B1', 'B2', 'B3'], ['C1', 'C2', 'C3']],
      align: ['left', 'center', 'right']
    };
    var node = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_["default"], mock));
    expect(node.hasClass('Table')).toBe(true);
  });
  it('can specify header colspans', function () {
    var mock = {
      head: [[['Col 1:2', 2], 'Col 3']],
      body: [['A1', 'A2', 'A3'], ['B1', 'B2', 'B3'], ['C1', 'C2', 'C3']],
      align: ['left', 'center', 'right']
    };
    var node = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_["default"], mock));
    expect(node.find('[colSpan]')).toHaveLength(1);
  });
});