aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-05-03 16:55:54 +0100
committerMichael Williamson <mike@zwobble.org>2013-05-03 16:55:54 +0100
commitb75fad95da8e77895791d2eab723212b7c5b9f98 (patch)
treeacbafb06b97b29cd87adef03eb697a98b538d639 /tests
parent5e21f1356d3ca5a77068e790f72fe8a2f286d568 (diff)
Add basic support for lists by using ListParagraph style
Diffstat (limited to 'tests')
-rw-r--r--tests/mammoth.tests.js8
-rwxr-xr-xtests/test-data/simple-list.docxbin0 -> 13887 bytes
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/mammoth.tests.js b/tests/mammoth.tests.js
index d8235ff..01afdb9 100644
--- a/tests/mammoth.tests.js
+++ b/tests/mammoth.tests.js
@@ -57,4 +57,12 @@ describe('mammoth', function() {
assert.equal(result.value, '<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAIAAAACUFjqAAAAAXNSR0IArs4c6QAAAAlwSFlzAAAOvgAADr4B6kKxwAAAABNJREFUKFNj/M+ADzDhlWUYqdIAQSwBE8U+X40AAAAASUVORK5CYII=" /></p>');
});
});
+
+ test('simple list is converted to list elements', function() {
+ var converter = new mammoth.Converter(mammoth.standardOptions);
+ var docxPath = path.join(__dirname, "test-data/simple-list.docx");
+ return converter.convertToHtml({path: docxPath}).then(function(result) {
+ assert.equal(result.value, '<ul><li>Apple</li><li>Banana</li></ul>');
+ });
+ });
})
diff --git a/tests/test-data/simple-list.docx b/tests/test-data/simple-list.docx
new file mode 100755
index 0000000..c2cd5ae
--- /dev/null
+++ b/tests/test-data/simple-list.docx
Binary files differ