Skip to content

Commit

Permalink
tests: remove unnecessary functions for supertest
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Jan 17, 2018
1 parent f8fba68 commit 94a6cbf
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions test/req.xhr.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ describe('req', function(){
request(app)
.get('/')
.set('X-Requested-With', 'xmlhttprequest')
.expect(200)
.end(function(err, res){
done(err);
})
.expect(200, done)
})

it('should case-insensitive', function(done){
Expand All @@ -32,10 +29,7 @@ describe('req', function(){
request(app)
.get('/')
.set('X-Requested-With', 'XMLHttpRequest')
.expect(200)
.end(function(err, res){
done(err);
})
.expect(200, done)
})

it('should return false otherwise', function(done){
Expand All @@ -49,10 +43,7 @@ describe('req', function(){
request(app)
.get('/')
.set('X-Requested-With', 'blahblah')
.expect(200)
.end(function(err, res){
done(err);
})
.expect(200, done)
})

it('should return false when not present', function(done){
Expand All @@ -65,10 +56,7 @@ describe('req', function(){

request(app)
.get('/')
.expect(200)
.end(function(err, res){
done(err);
})
.expect(200, done)
})
})
})

0 comments on commit 94a6cbf

Please sign in to comment.