"use strict";

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

var _createHtmlRubricItems = _interopRequireDefault(require("./createHtmlRubricItems"));

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

describe('Create HTML Rubric Items', () => {
  test('should create rows of rubric items', () => {
    const passedDescription = _faker.default.lorem.paragraph();

    const criteria = _faker.default.lorem.paragraph();

    const rubricItems = [{
      passed_description: passedDescription,
      criteria
    }];
    const html = (0, _createHtmlRubricItems.default)(rubricItems);
    expect(html).toMatch(passedDescription);
    expect(html).toMatch(criteria);
    expect(html).toMatch(/<tr.*>/i);
  });
});