summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-09-02 21:57:08 +0100
committerMichael Williamson <mike@zwobble.org>2016-09-02 21:57:08 +0100
commite5953b770484277e9119cef8358434cfad09df6b (patch)
treeae751cc4f0e34d4db80ced203610aaf912f016ac
parent80b8de43e07a741ac69ebf20cfe91ef6813c943c (diff)
Move type: image check into isImage
-rw-r--r--test/docx/body-reader.tests.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/test/docx/body-reader.tests.js b/test/docx/body-reader.tests.js
index fc3ab6a..45b04ea 100644
--- a/test/docx/body-reader.tests.js
+++ b/test/docx/body-reader.tests.js
@@ -415,7 +415,7 @@ function isSuccess(valueMatcher) {
function isImage(options) {
return allOf(
- hasProperties(_.omit(options, "buffer")),
+ hasProperties(_.extend({type: "image"}, _.omit(options, "buffer"))),
new FeatureMatcher(willBe(options.buffer), "buffer", "buffer", function(element) {
return element.read();
})
@@ -443,7 +443,6 @@ test("can read imagedata elements with r:id attribute", function() {
var result = readEmbeddedImage(imagedataElement);
return promiseThat(result, isSuccess(isImage({
- type: "image",
altText: "It's a hat",
contentType: "image/png",
buffer: IMAGE_BUFFER
@@ -459,7 +458,6 @@ test("can read inline pictures", function() {
var result = readEmbeddedImage(drawing);
return promiseThat(result, isSuccess(contains(isImage({
- type: "image",
altText: "It's a hat",
contentType: "image/png",
buffer: IMAGE_BUFFER
@@ -485,7 +483,6 @@ test("can read anchored pictures", function() {
var result = readEmbeddedImage(drawing);
return promiseThat(result, isSuccess(contains(isImage({
- type: "image",
altText: "It's a hat",
contentType: "image/png",
buffer: IMAGE_BUFFER
@@ -508,7 +505,6 @@ test("can read linked pictures", function() {
})
}));
return promiseThat(element, isImage({
- type: "image",
altText: "It's a hat",
contentType: "image/png",
buffer: IMAGE_BUFFER