Skip to content

Commit c894c84

Browse files
committed
build: support io.js 1.x
closes expressjs#2539
1 parent 4597e11 commit c894c84

File tree

4 files changed

+10
-14
lines changed

4 files changed

+10
-14
lines changed

.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ language: node_js
22
node_js:
33
- "0.10"
44
- "0.12"
5+
- "1.0"
6+
- "1.5"
57
sudo: false
68
before_install: "npm rm --save-dev connect-redis"
79
script: "npm run-script test-ci"

appveyor.yml

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ environment:
22
matrix:
33
- nodejs_version: "0.10"
44
- nodejs_version: "0.12"
5+
- nodejs_version: "1.0"
6+
- nodejs_version: "1.5"
57
install:
68
- ps: Install-Product node $env:nodejs_version
79
- npm rm --save-dev connect-redis

test/res.send.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('res', function(){
1616
request(app)
1717
.get('/')
1818
.expect('Content-Length', '0')
19-
.expect('', done);
19+
.expect(200, '', done);
2020
})
2121
})
2222

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

3131
request(app)
3232
.get('/')
33-
.expect('', function(req, res){
34-
res.header.should.not.have.property('content-length');
35-
done();
36-
});
33+
.expect(200, '', done);
3734
})
3835
})
3936

test/res.sendFile.js

+4-9
Original file line numberDiff line numberDiff line change
@@ -388,25 +388,20 @@ describe('res', function(){
388388
});
389389

390390
it('should invoke the callback on 404', function(done){
391-
var app = express()
392-
, calls = 0;
391+
var app = express();
392+
var calls = 0;
393393

394394
app.use(function(req, res){
395395
res.sendfile('test/fixtures/nope.html', function(err){
396-
++calls;
396+
assert.equal(calls++, 0);
397397
assert(!res.headersSent);
398398
res.send(err.message);
399399
});
400400
});
401401

402402
request(app)
403403
.get('/')
404-
.end(function(err, res){
405-
assert(1 == calls, 'called too many times');
406-
res.text.should.startWith("ENOENT, stat");
407-
res.statusCode.should.equal(200);
408-
done();
409-
});
404+
.expect(200, /^ENOENT.*?, stat/, done);
410405
})
411406

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

0 commit comments

Comments
 (0)