diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-09-02 23:19:53 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-09-02 23:20:42 +0100 |
| commit | 9d44fe567d20c5a82c4c2a01673325a31794745b (patch) | |
| tree | bd11998f60330017640c56ac0089c6db4487016d /test | |
| parent | 6e9740534d364c35b82428cf9f1c2bef970d0f28 (diff) | |
Use alt text title if description is missing
Diffstat (limited to 'test')
| -rw-r--r-- | test/docx/body-reader.tests.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/docx/body-reader.tests.js b/test/docx/body-reader.tests.js index 21ed961..878d279 100644 --- a/test/docx/body-reader.tests.js +++ b/test/docx/body-reader.tests.js @@ -469,6 +469,19 @@ test("can read inline pictures", function() { })))); }); +test("alt text title is used if alt text description is missing", function() { + var drawing = createInlineImage({ + blip: createEmbeddedBlip(IMAGE_RELATIONSHIP_ID), + title: "It's a hat" + }); + + var result = readEmbeddedImage(drawing); + + return promiseThat(result, isSuccess(contains(isImage({ + altText: "It's a hat" + })))); +}); + test("alt text title is used if alt text description is blank", function() { var drawing = createInlineImage({ blip: createEmbeddedBlip(IMAGE_RELATIONSHIP_ID), |
