diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-05-12 21:43:09 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-05-12 21:43:09 +0100 |
| commit | 9ecffea916f3117ad4d2484c1674d81862ef726f (patch) | |
| tree | 2cc8dcbf508364ddd1d0c0b628a7a95757ac9727 /tests/document-to-html.tests.js | |
| parent | 95fbf5b6967671758abe87bdf1559f22474786bf (diff) | |
Actually add support for table cells spanning multiple rows
Diffstat (limited to 'tests/document-to-html.tests.js')
| -rw-r--r-- | tests/document-to-html.tests.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/document-to-html.tests.js b/tests/document-to-html.tests.js index 3fcb49e..103b921 100644 --- a/tests/document-to-html.tests.js +++ b/tests/document-to-html.tests.js @@ -417,6 +417,22 @@ describe('DocumentConverter', function() { }); }); + test('table cells are written with rowSpan if not equal to one', function() { + var table = new documents.Table([ + new documents.TableRow([ + new documents.TableCell([], {rowSpan: 2}) + ]) + ]); + var converter = new DocumentConverter(); + + return converter.convertToHtml(table).then(function(result) { + var expectedHtml = "<table>" + + "<tr><td rowspan=\"2\"></td></tr>" + + "</table>"; + assert.equal(result.value, expectedHtml); + }); + }); + test('line break is converted to <br>', function() { var lineBreak = new documents.LineBreak(); var converter = new DocumentConverter(); |
