aboutsummaryrefslogtreecommitdiff
path: root/test/document-to-html.tests.js
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2026-09-16 23:16:52 +0100
committerMichael Williamson <mike@zwobble.org>2026-09-16 23:16:52 +0100
commitb703bcd2990768beb581be4da96b7ceaee21230b (patch)
treedb4914b0a93d18bb58cb64700765a59107747e8e /test/document-to-html.tests.js
parent0217e4f114ed5c1064c0ffc65c4a1819e8cec71d (diff)
Remove promises.when()
Diffstat (limited to 'test/document-to-html.tests.js')
-rw-r--r--test/document-to-html.tests.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/document-to-html.tests.js b/test/document-to-html.tests.js
index 8dc1e60..34b8545 100644
--- a/test/document-to-html.tests.js
+++ b/test/document-to-html.tests.js
@@ -785,7 +785,7 @@ test('images are written with data URIs', function() {
var imageBuffer = new Buffer("Not an image at all!");
var image = new documents.Image({
readImage: function(encoding) {
- return promises.when(imageBuffer.toString(encoding));
+ return promises.resolve(imageBuffer.toString(encoding));
},
contentType: "image/png"
});
@@ -799,7 +799,7 @@ test('images have alt attribute if available', function() {
var imageBuffer = new Buffer("Not an image at all!");
var image = new documents.Image({
readImage: function() {
- return promises.when(imageBuffer);
+ return promises.resolve(imageBuffer);
},
altText: "It's a hat"
});
@@ -817,7 +817,7 @@ test('can add custom handler for images', function() {
var imageBuffer = new Buffer("Not an image at all!");
var image = new documents.Image({
readImage: function(encoding) {
- return promises.when(imageBuffer.toString(encoding));
+ return promises.resolve(imageBuffer.toString(encoding));
},
contentType: "image/png"
});
@@ -837,7 +837,7 @@ test('when custom image handler throws error then error is stored in error messa
var error = new Error("Failed to convert image");
var image = new documents.Image({
readImage: function(encoding) {
- return promises.when(new Buffer().toString(encoding));
+ return promises.resolve(new Buffer().toString(encoding));
},
contentType: "image/png"
});