aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-09-02 23:19:53 +0100
committerMichael Williamson <mike@zwobble.org>2016-09-02 23:20:42 +0100
commit9d44fe567d20c5a82c4c2a01673325a31794745b (patch)
treebd11998f60330017640c56ac0089c6db4487016d /test
parent6e9740534d364c35b82428cf9f1c2bef970d0f28 (diff)
Use alt text title if description is missing
Diffstat (limited to 'test')
-rw-r--r--test/docx/body-reader.tests.js13
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),