res.status.js
This file
Path
test/res.status.js
20 lines · 411 bytes · JavaScript
Last changed by
remove unnecessary test/support/httpJonathan Ongbefore adoption643397e
History of this fileTake it
The walk stopped after 200 commits: lines older than 2e68ddb point at it.
expose connect.middleware using Object.getOwnPropertyDescriptor()Jonathan Ongbefore adoption2e68ddb
lines 1–2why, one step back12var express = require('../')remove unnecessary test/support/httpJonathan Ongbefore adoption643397e
line 3why, one step back3 , request = require('supertest');expose connect.middleware using Object.getOwnPropertyDescriptor()Jonathan Ongbefore adoption2e68ddb
lines 4–20why, one step back45describe('res', function(){6 describe('.status(code)', function(){7 it('should set the response .statusCode', function(done){8 var app = express();910 app.use(function(req, res){11 res.status(201).end('Created');12 });1314 request(app)15 .get('/')16 .expect('Created')17 .expect(201, done);18 })19 })20})