From f023801cdd40f90ff1ca3b8a1a56c5265f679796 Mon Sep 17 00:00:00 2001 From: Gerben Date: Thu, 12 Apr 2018 11:19:00 +0200 Subject: [PATCH] Simplify test for case without doctype. No need to test the DOM implementation itself. --- test/index.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/index.js b/test/index.js index 6800a34..edab320 100644 --- a/test/index.js +++ b/test/index.js @@ -13,10 +13,8 @@ function makeStubDocument(doctype) { return doc } -test('should return empty string if absent', t => { - const doctype = '' - const doc = makeStubDocument(doctype) - t.is(doctypeToString(doc.doctype), doctype) +test('should return empty string if doctype is null', t => { + t.is(doctypeToString(null), '') }) test('should work for a HTML5-ish doctype', t => {