From 0ee286b86c0f7fa635523a212e7e191826c66c96 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Sat, 25 Jul 2015 21:49:40 +0200 Subject: [PATCH] `from2-array` => `into-stream` --- package.json | 2 +- test/test-post.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index d360f2a..e00ca26 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "unzip-response": "^1.0.0" }, "devDependencies": { - "from2-array": "0.0.3", + "into-stream": "^2.0.0", "istanbul": "^0.3.13", "pem": "^1.4.4", "tap": "^1.0.0" diff --git a/test/test-post.js b/test/test-post.js index c8c68f3..540bb5b 100644 --- a/test/test-post.js +++ b/test/test-post.js @@ -1,6 +1,6 @@ 'use strict'; var test = require('tap').test; -var from2Array = require('from2-array'); +var intoStream = require('into-stream'); var got = require('../'); var server = require('./server.js'); var s = server.createServer(); @@ -31,7 +31,7 @@ test('setup', function (t) { test('GET can have body', function (t) { t.plan(3); - var stream = from2Array(['wow']); + var stream = intoStream(['wow']); stream.on('end', function () { // ensure that stream was dumped @@ -57,7 +57,7 @@ test('send data from options with post request', function (t) { t.equal(data, 'wow'); }); - got(s.url, {body: from2Array(['wow'])}, function (err, data) { + got(s.url, {body: intoStream(['wow'])}, function (err, data) { t.error(err); t.equal(data, 'wow'); }); @@ -84,7 +84,7 @@ test('post have content-length header to string', function (t) { t.equal(headers['content-length'], '3'); }); - got(s.url + '/headers', {body: from2Array(['wow']), json: true}, function (err, headers) { + got(s.url + '/headers', {body: intoStream(['wow']), json: true}, function (err, headers) { t.error(err); t.equal(headers['content-length'], undefined); });