Skip to content
Myr

res.type.js

This file

Path

test/res.type.js

22 lines · 521 bytes · JavaScript

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than f98c112 point at it.

Added app.render() local precedence testTj Holowaychukbefore adoptionf98c112

lines 1–22why, one step back
1
2var express = require('../')3 , request = require('./support/http');45describe('res', function(){6 describe('.type(str)', function(){7 it('should set the Content-Type based on a filename', function(done){8 var app = express();910 app.use(function(req, res){11 res.type('foo.js').end('var name = "tj";');12 });1314 request(app)15 .get('/')16 .end(function(res){17 res.headers.should.have.property('content-type', 'application/javascript');18 done();19 })20 })21 })22})