import React from "react";
import { mount } from "enzyme";

import FlatTableBody from "./flat-table-body.component";
import FlatTable from "../flat-table.component";

function renderComponent(props = {}) {
  return mount(
    <FlatTable>
      <FlatTableBody {...props}>Children</FlatTableBody>
    </FlatTable>
  );
}

describe("FlatTableBody", () => {
  describe("when a data prop is added", () => {
    it("should be added to the root element", () => {
      const wrapper = renderComponent({ "data-role": "test" });

      expect(wrapper.find("tbody").props()["data-role"]).toEqual("test");
    });
  });
});

@@ -267,16 +267,30 @@
 ps%7D%3E
-Children
+%0A        %3Ctr /%3E%0A      
 %3C/Fl

fix semantically incorrect html