aboutsummaryrefslogtreecommitdiff
path: root/tests/document-to-html.tests.js
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2014-03-06 11:06:43 +0000
committerMichael Williamson <mike@zwobble.org>2014-03-06 11:06:43 +0000
commitf5b9b1c8632de9f2066bc45ded336d1e04e64aab (patch)
treec2351d3052b1bb3fc0f0d470be1786100303113e /tests/document-to-html.tests.js
parent85e30f452001b5d02a617da21c72e12b206dfdb4 (diff)
Use bluebird instead of q for better performance
Diffstat (limited to 'tests/document-to-html.tests.js')
-rw-r--r--tests/document-to-html.tests.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/document-to-html.tests.js b/tests/document-to-html.tests.js
index dde395d..35f4424 100644
--- a/tests/document-to-html.tests.js
+++ b/tests/document-to-html.tests.js
@@ -1,5 +1,5 @@
var assert = require("assert");
-var q = require("q");
+var promises = require("../lib/promises");
var documents = require("../lib/documents");
var DocumentConverter = require("../lib/document-to-html").DocumentConverter;
@@ -201,7 +201,7 @@ describe('DocumentConverter', function() {
var imageBuffer = new Buffer("Not an image at all!");
var image = new documents.Image({
readImage: function(encoding) {
- return q.when(imageBuffer.toString(encoding));
+ return promises.when(imageBuffer.toString(encoding));
},
contentType: "image/png"
});
@@ -215,7 +215,7 @@ describe('DocumentConverter', function() {
var imageBuffer = new Buffer("Not an image at all!");
var image = new documents.Image({
readImage: function() {
- return q.when(imageBuffer);
+ return promises.when(imageBuffer);
},
altText: "It's a hat"
});
@@ -234,7 +234,7 @@ describe('DocumentConverter', function() {
var imageBuffer = new Buffer("Not an image at all!");
var image = new documents.Image({
readImage: function(encoding) {
- return q.when(imageBuffer.toString(encoding));
+ return promises.when(imageBuffer.toString(encoding));
},
contentType: "image/png"
});