diff options
Diffstat (limited to 'tests/docx-reader.tests.js')
| -rw-r--r-- | tests/docx-reader.tests.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/docx-reader.tests.js b/tests/docx-reader.tests.js index b7e1c29..c486f3b 100644 --- a/tests/docx-reader.tests.js +++ b/tests/docx-reader.tests.js @@ -25,4 +25,24 @@ describe("docx-reader", function() { assert.deepEqual(expectedDocument, result); }); }); + + test("can read paragraph styles", function() { + var docxFile = createFakeDocxFile({ + "word/document.xml": testData("paragraphStyles/word/document.xml") + }); + return docxReader.read(docxFile).then(function(result) { + var paragraph = result.children[0]; + assert.deepEqual({styleName: "Heading1"}, paragraph.properties); + }); + }); + + test("paragraph properties are not included as child of paragraph", function() { + var docxFile = createFakeDocxFile({ + "word/document.xml": testData("paragraphStyles/word/document.xml") + }); + return docxReader.read(docxFile).then(function(result) { + var paragraph = result.children[0]; + assert.equal(1, paragraph.children.length); + }); + }); }); |
