From b703bcd2990768beb581be4da96b7ceaee21230b Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 16 Sep 2026 23:16:52 +0100 Subject: Remove promises.when() --- test/document-to-html.tests.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/document-to-html.tests.js') 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" }); -- cgit v1.2.3