From 54a2d0da8598a6f9c4df9af02634f388c51f2bcf Mon Sep 17 00:00:00 2001 From: Stef Busking Date: Wed, 21 Jun 2017 10:29:16 +0200 Subject: [PATCH] Add test for the DocumentFragment constructor. --- test/DocumentFragment.tests.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/DocumentFragment.tests.ts b/test/DocumentFragment.tests.ts index 9538f07..30baed4 100644 --- a/test/DocumentFragment.tests.ts +++ b/test/DocumentFragment.tests.ts @@ -14,6 +14,15 @@ describe('DocumentFragment', () => { chai.assert.equal(df.nodeType, 11); chai.assert.equal(df.nodeName, '#document-fragment'); chai.assert.equal(df.nodeValue, null); + chai.assert.equal(df.ownerDocument, document); + }); + + it('can be created using its constructor', () => { + const df = new slimdom.DocumentFragment(); + chai.assert.equal(df.nodeType, 11); + chai.assert.equal(df.nodeName, '#document-fragment'); + chai.assert.equal(df.nodeValue, null); + chai.assert.equal(df.ownerDocument, slimdom.document); }); it('can not change its nodeValue', () => {