Skip to content

Commit

Permalink
Merge pull request #292 from morganherlocker/express4-docs
Browse files Browse the repository at this point in the history
Express@4.x.x API docs and example
  • Loading branch information
mikelax committed Dec 22, 2015
2 parents 57981b3 + b011791 commit 386cf31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Readme.md
Expand Up @@ -32,7 +32,7 @@ var request = require('supertest')
var app = express();

app.get('/user', function(req, res){
res.send(200, { name: 'tobi' });
res.status(200).json({ name: 'tobi' });
});

request(app)
Expand Down
4 changes: 2 additions & 2 deletions example.js
Expand Up @@ -5,13 +5,13 @@ var request = require('./')
var app = express();

app.get('/user', function(req, res){
res.send(201, { name: 'tobi' });
res.status(201).json({ name: 'tobi' });
});

request(app)
.get('/user')
.expect('Content-Type', /json/)
.expect('Content-Length', '20')
.expect('Content-Length', '15')
.expect(201)
.end(function(err, res){
if (err) throw err;
Expand Down

0 comments on commit 386cf31

Please sign in to comment.