diff options
| author | Michael Williamson <mike@zwobble.org> | 2024-02-18 12:54:33 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2024-02-18 12:54:33 +0000 |
| commit | c2c6dd1714bd02f7e516746daf3d22938e6407ee (patch) | |
| tree | 389774194390c65ce368b6a68403c3068d4edeaa /test | |
| parent | c94c56d2373071373d957ad4641550c7d4833f48 (diff) | |
Add test for strict format
Diffstat (limited to 'test')
| -rw-r--r-- | test/mammoth.tests.js | 7 | ||||
| -rw-r--r-- | test/test-data/strict-format.docx | bin | 0 -> 11692 bytes |
2 files changed, 7 insertions, 0 deletions
diff --git a/test/mammoth.tests.js b/test/mammoth.tests.js index 3b1726e..93a4f16 100644 --- a/test/mammoth.tests.js +++ b/test/mammoth.tests.js @@ -496,6 +496,13 @@ test('extractRawText can use .docx files represented by a Buffer', function() { }); }); +test('can read strict format', function() { + var docxPath = path.join(__dirname, "test-data/strict-format.docx"); + return mammoth.convertToHtml({path: docxPath}).then(function(result) { + assert.equal(result.value, "<p>Test</p>"); + assert.deepEqual(result.messages, []); + }); +}); test('should throw error if file is not a valid docx document', function() { var docxPath = path.join(__dirname, "test-data/empty.zip"); diff --git a/test/test-data/strict-format.docx b/test/test-data/strict-format.docx Binary files differnew file mode 100644 index 0000000..4495720 --- /dev/null +++ b/test/test-data/strict-format.docx |
