diff --git a/package.json b/package.json index f7e2517..b9c1cbf 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,8 @@ "node": ">=0.10.0" }, "scripts": { - "test": "taper test/test-*.js" + "test": "tape test/test-*.js | tap-dot", + "coverage": "istanbul cover tape --report html -- test/test-*.js" }, "files": [ "index.js" @@ -50,8 +51,9 @@ }, "devDependencies": { "from2-array": "0.0.3", + "istanbul": "^0.3.13", "pem": "^1.4.4", - "tape": "^3.0.3", - "taper": "^0.3.0" + "tap-dot": "^1.0.0", + "tape": "^3.5.0" } } diff --git a/test/test-post.js b/test/test-post.js index 95ef569..4a33943 100644 --- a/test/test-post.js +++ b/test/test-post.js @@ -42,6 +42,14 @@ tape('works with empty post response', function (t) { }); }); +tape('return readable stream', function (t) { + got.post(s.url, {body: from(['wow'])}) + .on('data', function (data) { + t.equal(data.toString(), 'wow'); + t.end(); + }); +}); + tape('return writeable stream', function (t) { got.post(s.url) .on('data', function (data) {