Skip to content

Commit

Permalink
build: support io.js 1.x
Browse files Browse the repository at this point in the history
closes #2539
  • Loading branch information
dougwilson committed Mar 17, 2015
1 parent 4597e11 commit c894c84
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ language: node_js
node_js:
- "0.10"
- "0.12"
- "1.0"
- "1.5"
sudo: false
before_install: "npm rm --save-dev connect-redis"
script: "npm run-script test-ci"
Expand Down
2 changes: 2 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ environment:
matrix:
- nodejs_version: "0.10"
- nodejs_version: "0.12"
- nodejs_version: "1.0"
- nodejs_version: "1.5"
install:
- ps: Install-Product node $env:nodejs_version
- npm rm --save-dev connect-redis
Expand Down
7 changes: 2 additions & 5 deletions test/res.send.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('res', function(){
request(app)
.get('/')
.expect('Content-Length', '0')
.expect('', done);
.expect(200, '', done);
})
})

Expand All @@ -30,10 +30,7 @@ describe('res', function(){

request(app)
.get('/')
.expect('', function(req, res){
res.header.should.not.have.property('content-length');
done();
});
.expect(200, '', done);
})
})

Expand Down
13 changes: 4 additions & 9 deletions test/res.sendFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,25 +388,20 @@ describe('res', function(){
});

it('should invoke the callback on 404', function(done){
var app = express()
, calls = 0;
var app = express();
var calls = 0;

app.use(function(req, res){
res.sendfile('test/fixtures/nope.html', function(err){
++calls;
assert.equal(calls++, 0);
assert(!res.headersSent);
res.send(err.message);
});
});

request(app)
.get('/')
.end(function(err, res){
assert(1 == calls, 'called too many times');
res.text.should.startWith("ENOENT, stat");
res.statusCode.should.equal(200);
done();
});
.expect(200, /^ENOENT.*?, stat/, done);
})

it('should not override manual content-types', function(done){
Expand Down

0 comments on commit c894c84

Please sign in to comment.