diff options
| author | Michael Williamson <mike@zwobble.org> | 2014-04-22 11:42:08 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-04-22 11:42:08 +0100 |
| commit | c33d575f33591f0b7b2e838b5dc21b6b0cc3a457 (patch) | |
| tree | e311ecea51e776424004a319fafc91635b4bb325 /tests | |
| parent | baafeb9304ad9505d76d57962711060035e40558 (diff) | |
Read names from styles.xml
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/docx/styles-reader.tests.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/docx/styles-reader.tests.js b/tests/docx/styles-reader.tests.js index 274f822..6dfdcd2 100644 --- a/tests/docx/styles-reader.tests.js +++ b/tests/docx/styles-reader.tests.js @@ -43,6 +43,15 @@ describe('readStylesXml', function() { assert.equal(styles.findCharacterStyleById("Heading1"), null); assert.equal(styles.findParagraphStyleById("Heading1Char"), null); }); + + test('styles include names', function() { + var styles = readStylesXml({ + root: new XmlElement("w:styles", {}, [ + paragraphStyleElement("Heading1", "Heading 1") + ]) + }); + assert.equal(styles.findParagraphStyleById("Heading1").name, "Heading 1"); + }); }); function paragraphStyleElement(id, name) { |
