"use strict";

var _faker = _interopRequireDefault(require("faker"));

var _createHtmlRubricSections = _interopRequireDefault(require("./createHtmlRubricSections"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

describe('Create HTML Rubric Sections', () => {
  test('should create table of rubrics', () => {
    const name = _faker.default.lorem.words();

    const sections = [{
      name,
      rubric_items: [{
        passed_description: _faker.default.lorem.paragraph(),
        criteria: _faker.default.lorem.paragraph()
      }]
    }];
    const html = (0, _createHtmlRubricSections.default)(sections);
    expect(html).toMatch(name);
    expect(html).toMatch(/<table.*>/i);
    expect(html).toMatch(/<td.*>/i);
  });
});