import { expect, helpers, describe, it, before, after } from './assets/init-test';

import isDOMChildNode from '../isDOMChildNode';



const testID = 'TestNode';



describe('"isDOMChildNode"', () => {
  before(() => helpers.html(
    `<div id="${testID}">
      <span></span>
    </div>`
  ));

  after(() => helpers.remove(testID));

  it('Should return true for DOM nodes in the DOM below the DOM root element', () => {
    expect(isDOMChildNode(document.body)).to.equal(true);
    expect(isDOMChildNode(document.documentElement)).to.equal(false);
    expect(isDOMChildNode(helpers.id(testID).firstChild)).to.equal(true);
  });

  it('Should return true for child DOM nodes of a DOM element not in the DOM', () => {
    const div = helpers.create('div');
    div.innerHTML = '<b></b>\ntext';
    expect(isDOMChildNode(div)).to.equal(false);
    expect(isDOMChildNode(div.firstChild)).to.equal(true);
    expect(isDOMChildNode(div.firstChild.nextSibling)).to.equal(true);
  });

  it('Should return false for non DOM elements', () => {
    expect(isDOMChildNode(null)).to.equal(false);
    expect(isDOMChildNode({})).to.equal(false);
    expect(isDOMChildNode({ parentNode: { nodeType: 1 } })).to.equal(false);
    expect(isDOMChildNode()).to.equal(false);
  });
});

@@ -478,78 +478,8 @@
 e);%0A
-    expect(isDOMChildNode(document.documentElement)).to.equal(false);%0A
     
@@ -896,32 +896,221 @@
 l(true);%0A  %7D);%0A%0A
+  it('Should return false for DOM root elements', () =%3E %7B%0A    expect(isDOMChildNode(document)).to.equal(false);%0A    expect(isDOMChildNode(document.documentElement)).to.equal(false);%0A  %7D);%0A%0A
   it('Should ret

Improve tests