Skip to content
Myr

Added test for res.sendfile() express.static() options

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by TJ Holowaychuk · committed by TJ Holowaychuk · parent cdca9cf · Browse files · 1 file+16 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+16 added−1 removed

  • tests:+16 added−1 removed

1 file+16 added−1 removed

modified:test/res.sendfile.js+16 added-1 removed
22 unmodified lines
23 res.statusCode.should.equal(200);24 done();25 });26 })27 2728 it('should utilize the same options as express.static()', function(done){29 var app = express();3031 app.use(function(req, res){32 res.sendfile('test/fixtures/user.html', { maxAge: 60000 });33 });3435 request(app)36 .get('/')37 .end(function(res){38 res.should.have.header('Cache-Control', 'public, max-age=60');39 done();40 });41 })4243 it('should invoke the callback on 404', function(done){44 var app = express()45 , calls = 0;46
198 unmodified lines