Skip to content

Commit

Permalink
lint: apply standard 11 style
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Mar 5, 2018
1 parent 1b7f844 commit 8d4bd68
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
16 changes: 8 additions & 8 deletions README.md
Expand Up @@ -169,14 +169,14 @@ var http = require('http')

var server = http.createServer(function (req, res) {
getRawBody(req)
.then(function (buf) {
res.statusCode = 200
res.end(buf.length + ' bytes submitted')
})
.catch(function (err) {
res.statusCode = 500
res.end(err.message)
})
.then(function (buf) {
res.statusCode = 200
res.end(buf.length + ' bytes submitted')
})
.catch(function (err) {
res.statusCode = 500
res.end(err.message)
})
})

server.listen(3000)
Expand Down
8 changes: 4 additions & 4 deletions package.json
Expand Up @@ -17,11 +17,11 @@
},
"devDependencies": {
"bluebird": "3.5.1",
"eslint": "3.19.0",
"eslint-config-standard": "10.2.1",
"eslint-plugin-import": "2.8.0",
"eslint": "4.18.2",
"eslint-config-standard": "11.0.0",
"eslint-plugin-import": "2.9.0",
"eslint-plugin-markdown": "1.0.0-beta.6",
"eslint-plugin-node": "5.2.1",
"eslint-plugin-node": "6.0.1",
"eslint-plugin-promise": "3.6.0",
"eslint-plugin-standard": "3.0.1",
"istanbul": "0.4.5",
Expand Down
5 changes: 2 additions & 3 deletions test/index.js
Expand Up @@ -226,15 +226,14 @@ describe('Raw Body', function () {

it('should work as a promise', function () {
return getRawBody(createStream())
.then(checkBuffer)
.then(checkBuffer)
})

it('should work as a promise when length > limit', function () {
return getRawBody(createStream(), {
length: length,
limit: length - 1
})
.then(throwExpectedError, function (err) {
}).then(throwExpectedError, function (err) {
assert.equal(err.status, 413)
})
})
Expand Down

0 comments on commit 8d4bd68

Please sign in to comment.