diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-04-11 19:59:52 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-04-11 19:59:52 +0100 |
| commit | 57622e1584e7367aa41d4a09f8db33c703a6a0df (patch) | |
| tree | 1247f7e17235fbd79fcb59b2e1ce2749fea338f6 /tests | |
| parent | 9fdb851306e79d5ebe72c0e3e81a9b19ce0d79dc (diff) | |
Use actual docx for testing single paragraph docx
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/mammoth.tests.js | 8 | ||||
| -rwxr-xr-x | tests/test-data/single-paragraph.docx | bin | 0 -> 12773 bytes |
2 files changed, 3 insertions, 5 deletions
diff --git a/tests/mammoth.tests.js b/tests/mammoth.tests.js index e892917..823a35b 100644 --- a/tests/mammoth.tests.js +++ b/tests/mammoth.tests.js @@ -12,12 +12,10 @@ var createFakeDocxFile = testing.createFakeDocxFile; describe('mammoth', function() { test('should convert docx containing one one paragraph to single p element', function() { - var docxFile = createFakeDocxFile({ - "word/document.xml": testData("simple/word/document.xml") - }); + var docxPath = path.join(__dirname, "test-data/single-paragraph.docx"); var converter = new mammoth.Converter(); - return converter.convertToHtml(docxFile).then(function(result) { - assert.equal("<p>Hello.</p>", result.html); + return converter.convertToHtml(docxPath).then(function(result) { + assert.equal("<p>Walking on imported air</p>", result.html); }); }); diff --git a/tests/test-data/single-paragraph.docx b/tests/test-data/single-paragraph.docx Binary files differnew file mode 100755 index 0000000..09caf9a --- /dev/null +++ b/tests/test-data/single-paragraph.docx |
