/
githubmirror
/
express
Обзор
Документация
Войти
/
githubmirror
/
express
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
4.17.2
test/res.get.js
19 строк
459 B
Douglas Christopher Wilson
tests: remove more mocking uses
21 янв 2015, 11:17
21 янв 2015, 11:17
855176b
Код
Авторство
О чём код?
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); }) }) })