From 9d44fe567d20c5a82c4c2a01673325a31794745b Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Fri, 2 Sep 2016 23:19:53 +0100 Subject: Use alt text title if description is missing --- test/docx/body-reader.tests.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test') 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), -- cgit v1.2.3