diff options
| author | Michael Williamson <mike@zwobble.org> | 2017-05-24 23:07:33 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2017-05-24 23:07:33 +0100 |
| commit | 9cc065c434b00b10ba234afa952fedf7e20a59af (patch) | |
| tree | 86acdfaa583e5e25c7d3a6446aaa981b81681f75 /test/document-to-html.tests.js | |
| parent | 4c90a1ca64509d6c7b5d51826ab36db1c49bb380 (diff) | |
Handle unexpected children in table
Diffstat (limited to 'test/document-to-html.tests.js')
| -rw-r--r-- | test/document-to-html.tests.js | 12 |
1 files changed, 12 insertions, 0 deletions
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 = "<table>\t</table>"; + assert.equal(result.value, expectedHtml); + }); +}); + test('empty cells are preserved in table', function() { var table = new documents.Table([ new documents.TableRow([ |
