diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-04-02 23:25:44 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-04-02 23:25:44 +0100 |
| commit | 2ea1d69fe5821a1e4f28e7c411e5bf41a498b2fa (patch) | |
| tree | ce3934f9f3b27f70219e0cbf0751db2b9b668f92 /tests/docx-reader.tests.js | |
| parent | b346be31b8103d403134f12141b51f3321a6f442 (diff) | |
Read description of images
Diffstat (limited to 'tests/docx-reader.tests.js')
| -rw-r--r-- | tests/docx-reader.tests.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/docx-reader.tests.js b/tests/docx-reader.tests.js index 8971782..7211f1a 100644 --- a/tests/docx-reader.tests.js +++ b/tests/docx-reader.tests.js @@ -128,6 +128,7 @@ describe("readElement", function() { test("can read inline pictures", function() { var drawing = new XmlElement("w:drawing", {}, [ new XmlElement("wp:inline", {}, [ + new XmlElement("wp:docPr", {descr: "It's a hat"}), new XmlElement("a:graphic", {}, [ new XmlElement("a:graphicData", {}, [ new XmlElement("pic:pic", {}, [ @@ -151,7 +152,8 @@ describe("readElement", function() { ); var result = reader.readXmlElement(drawing); assert.deepEqual(result.messages, []); - assert.deepEqual("image", result.value.type); + assert.equal("image", result.value.type); + assert.equal(result.value.altText, "It's a hat"); return result.value.read() .then(function(readValue) { assert.equal(readValue, imageBuffer) |
