aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/mammoth.tests.js8
-rw-r--r--tests/test-data/bom.docxbin0 -> 2836 bytes
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/mammoth.tests.js b/tests/mammoth.tests.js
index e0c1f6c..9be7006 100644
--- a/tests/mammoth.tests.js
+++ b/tests/mammoth.tests.js
@@ -32,6 +32,14 @@ describe('mammoth', function() {
});
});
+ test('should read docx xml files with unicode byte order mark', function() {
+ var docxPath = path.join(__dirname, "test-data/bom.docx");
+ return mammoth.convertToHtml({path: docxPath}).then(function (result) {
+ assert.equal(result.value, "<p>This XML has a byte order mark.</p>");
+ assert.deepEqual(result.messages, []);
+ });
+ });
+
test('style map can be expressed as string', function() {
var docxFile = createFakeDocxFile({
"word/document.xml": testData("simple/word/document.xml")
diff --git a/tests/test-data/bom.docx b/tests/test-data/bom.docx
new file mode 100644
index 0000000..3881238
--- /dev/null
+++ b/tests/test-data/bom.docx
Binary files differ