/
githubmirror
/
express
Обзор
Документация
Войти
/
githubmirror
/
express
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
4.17.2
test/res.sendStatus.js
30 строк
648 B
Douglas Christopher Wilson
lint: remove all unused varaibles
06 авг 2017, 07:19
06 авг 2017, 07:19
e006622
Код
Авторство
О чём код?
var express = require('..') var request = require('supertest') describe('res', function () { describe('.sendStatus(statusCode)', function () { it('should send the status code and message as body', function (done) { var app = express(); app.use(function(req, res){ res.sendStatus(201); }); request(app) .get('/') .expect(201, 'Created', done); }) it('should work with unknown code', function (done) { var app = express(); app.use(function(req, res){ res.sendStatus(599); }); request(app) .get('/') .expect(599, '599', done); }) }) })