diff options
| author | Michael Williamson <mike@zwobble.org> | 2014-07-05 19:25:00 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-07-05 19:25:22 +0100 |
| commit | eda2c2db9e9e2775f1d62397ff98bd51f327f428 (patch) | |
| tree | d7777b79c943e3e280c2de03ce66c3d373d287c0 | |
| parent | 6c61b65190684bb22662ce094f96aabaa5b129c9 (diff) | |
Add disabled test for table support
| -rw-r--r-- | tests/mammoth.tests.js | 10 | ||||
| -rwxr-xr-x | tests/test-data/tables.docx | bin | 0 -> 13087 bytes |
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/mammoth.tests.js b/tests/mammoth.tests.js index 1fc278e..bcdeea3 100644 --- a/tests/mammoth.tests.js +++ b/tests/mammoth.tests.js @@ -88,6 +88,16 @@ describe('mammoth', function() { }); }); + test('word tables are converted to html tables', function() { + // TODO: enable this test once tables are supported + return; + var docxPath = path.join(__dirname, "test-data/tables.docx"); + return mammoth.convertToHtml({path: docxPath}).then(function(result) { + assert.equal(result.value, "<p>Above</p><table><tr><td>Top left</td><td>Top right</td></tr><tr><td>Bottom left</td><td>Bottom right</td></tr></table><p>Below</p>"); + assert.deepEqual(result.messages, []); + }); + }); + test('footnotes are appended to text', function() { // TODO: don't duplicate footnotes with multiple references var docxPath = path.join(__dirname, "test-data/footnotes.docx"); diff --git a/tests/test-data/tables.docx b/tests/test-data/tables.docx Binary files differnew file mode 100755 index 0000000..86009a7 --- /dev/null +++ b/tests/test-data/tables.docx |
