{"size": 522, "ext": "js", "max_stars_repo_path": "spec/fn/remove.spec.js", "max_stars_repo_name": "demiazz/homey", "max_stars_repo_stars_event_min_datetime": "2017-07-10T10:48:45.000Z", "max_stars_repo_stars_event_max_datetime": "2017-09-03T19:18:22.000Z", "max_issues_repo_path": "spec/fn/remove.spec.js", "max_issues_repo_name": "demiazz/homey", "max_issues_repo_issues_event_min_datetime": "2017-05-06T09:07:24.000Z", "max_issues_repo_issues_event_max_datetime": "2017-07-28T16:08:48.000Z", "max_forks_repo_path": "spec/fn/remove.spec.js", "max_forks_repo_name": "demiazz/homey", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": 13, "max_forks_count": null, "avg_line_length": 24.8571428571, "max_line_length": 63, "alphanum_fraction": 0.6302681992}
import remove from "../../src/fn/remove";

describe("fn/remove", () => {
  afterEach(clearFixtures);

  it("removes element if attached to DOM", () => {
    useFixture(`<div class="root"></div>`);

    const subject = document.querySelector(".root");

    expect(remove(subject)).toBe(true);
    expect(document.querySelector(".root")).toBe(null);
  });

  it("does nothing if element doesn't attached to DOM", () => {
    const subject = document.createElement("div");

    expect(remove(subject)).toBe(false);
  });
});
