Skip to content

Commit 425251f

Browse files
committed
Fix tests
1 parent 9cc2377 commit 425251f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/parsing_spec.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ describe('parsing', function(){
4646

4747
needle.get('localhost:' + port, function(err, response, body) {
4848
should.not.exist(err);
49-
body.should.be.an.instanceof(Buffer)
49+
body.should.be.an.instanceof(String)
5050
body.toString().should.eql('{"foo":"bar"}');
5151

5252
needle.defaults({ parse_response: 'all' });
@@ -141,7 +141,7 @@ describe('parsing', function(){
141141
it('does NOT return object', function(done){
142142
needle.get('localhost:' + port, { parse: false }, function(err, response, body) {
143143
should.not.exist(err);
144-
body.should.be.an.instanceof(Buffer)
144+
body.should.be.an.instanceof(String)
145145
body.toString().should.eql('{"foo":"bar"}');
146146
done();
147147
})
@@ -162,7 +162,7 @@ describe('parsing', function(){
162162
it('does NOT return object', function(done){
163163
needle.get('localhost:' + port, { parse: 'xml' }, function(err, response, body) {
164164
should.not.exist(err);
165-
body.should.be.an.instanceof(Buffer)
165+
body.should.be.an.instanceof(String)
166166
body.toString().should.eql('{"foo":"bar"}');
167167
done();
168168
})
@@ -281,7 +281,7 @@ describe('parsing', function(){
281281
it('does NOT return object', function(done){
282282
needle.get('localhost:' + port, { parse: false }, function(err, response, body) {
283283
should.not.exist(err);
284-
body.should.be.an.instanceof(Buffer)
284+
body.should.be.an.instanceof(String)
285285
body.toString().should.eql('false');
286286
done();
287287
})
@@ -294,7 +294,7 @@ describe('parsing', function(){
294294
it('does NOT return object', function(done){
295295
needle.get('localhost:' + port, { parse: 'xml' }, function(err, response, body) {
296296
should.not.exist(err);
297-
body.should.be.an.instanceof(Buffer)
297+
body.should.be.an.instanceof(String)
298298
body.toString().should.eql('false');
299299
done();
300300
})

0 commit comments

Comments
 (0)