res.get.js
This file
Path
test/res.get.js
20 lines · 459 bytes · JavaScript
Last changed by
Merge tag '3.19.1'Douglas Christopher Wilsonbefore adoption82689d6
History of this fileTake it
123456789101112131415161718192021
var express = require('..');var request = require('supertest');
describe('res', function(){ describe('.get(field)', function(){ it('should get the response header field', function (done) { var app = express();
app.use(function (req, res) { res.setHeader('Content-Type', 'text/x-foo'); res.send(res.get('Content-Type')); });
request(app) .get('/') .expect(200, 'text/x-foo', done); }) })})