diff --git a/package.json b/package.json index 6b474b3..46c019d 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "url-parse-lax": "^1.0.0" }, "devDependencies": { - "ava": "^0.3.0", + "ava": "^0.4.1", "coveralls": "^2.11.4", "get-port": "^2.0.0", "into-stream": "^2.0.0", diff --git a/test/_server.js b/test/_server.js index 0da87ea..663e009 100644 --- a/test/_server.js +++ b/test/_server.js @@ -3,6 +3,7 @@ var http = require('http'); var https = require('https'); var pify = require('pify'); var getPort = require('get-port'); +var Promise = require('pinkie-promise'); var host = exports.host = 'localhost'; exports.createServer = function () { @@ -16,8 +17,8 @@ exports.createServer = function () { s.url = 'http://' + host + ':' + port; s.protocol = 'http'; - s.listen = pify(s.listen); - s.close = pify(s.close); + s.listen = pify(s.listen, Promise); + s.close = pify(s.close, Promise); return s; }); @@ -34,8 +35,8 @@ exports.createSSLServer = function (opts) { s.url = 'https://' + host + ':' + port; s.protocol = 'https'; - s.listen = pify(s.listen); - s.close = pify(s.close); + s.listen = pify(s.listen, Promise); + s.close = pify(s.close, Promise); return s; }); diff --git a/test/arguments.js b/test/arguments.js index b4bdc02..4221989 100644 --- a/test/arguments.js +++ b/test/arguments.js @@ -1,5 +1,4 @@ import test from 'ava'; -import pify from 'pify'; import got from '../'; import {createServer} from './_server'; diff --git a/test/https.js b/test/https.js index 87772fa..1bf5bc8 100644 --- a/test/https.js +++ b/test/https.js @@ -10,7 +10,7 @@ let cert; let caRootKey; let caRootCert; -const pemP = pify(pem); +const pemP = pify(pem, Promise); test.before('setup', async t => { const caKeys = await pemP.createCertificate({days: 1, selfSigned: true});