From 57622e1584e7367aa41d4a09f8db33c703a6a0df Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Thu, 11 Apr 2013 19:59:52 +0100 Subject: Use actual docx for testing single paragraph docx --- tests/mammoth.tests.js | 8 +++----- tests/test-data/single-paragraph.docx | Bin 0 -> 12773 bytes 2 files changed, 3 insertions(+), 5 deletions(-) create mode 100755 tests/test-data/single-paragraph.docx 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("

Hello.

", result.html); + return converter.convertToHtml(docxPath).then(function(result) { + assert.equal("

Walking on imported air

", result.html); }); }); diff --git a/tests/test-data/single-paragraph.docx b/tests/test-data/single-paragraph.docx new file mode 100755 index 0000000..09caf9a Binary files /dev/null and b/tests/test-data/single-paragraph.docx differ -- cgit v1.2.3