mirror of
https://github.com/zebrajr/express.git
synced 2026-01-15 12:15:27 +00:00
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -16,7 +16,7 @@ describe('res', function(){
|
||||
request(app)
|
||||
.get('/')
|
||||
.expect('Content-Length', '0')
|
||||
.expect('', done);
|
||||
.expect(200, '', done);
|
||||
})
|
||||
})
|
||||
|
||||
@@ -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);
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -388,12 +388,12 @@ 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);
|
||||
});
|
||||
@@ -401,12 +401,7 @@ describe('res', function(){
|
||||
|
||||
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){
|
||||
|
||||
Reference in New Issue
Block a user