From 9cc065c434b00b10ba234afa952fedf7e20a59af Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 24 May 2017 23:07:33 +0100 Subject: Handle unexpected children in table --- test/document-to-html.tests.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test') diff --git a/test/document-to-html.tests.js b/test/document-to-html.tests.js index baa7df9..a55f9a2 100644 --- a/test/document-to-html.tests.js +++ b/test/document-to-html.tests.js @@ -415,6 +415,18 @@ test('tbody is omitted if all rows are headers', function() { }); }); +test('unexpected table children do not cause error', function() { + var table = new documents.Table([ + new documents.tab() + ]); + var converter = new DocumentConverter(); + + return converter.convertToHtml(table).then(function(result) { + var expectedHtml = "\t
"; + assert.equal(result.value, expectedHtml); + }); +}); + test('empty cells are preserved in table', function() { var table = new documents.Table([ new documents.TableRow([ -- cgit v1.2.3