Skip to content

Commit

Permalink
fix(bodyparser): use buffer.from.length vs buffer.byteLength
Browse files Browse the repository at this point in the history
Reference node issue nodejs/node#11165
  • Loading branch information
thetutlage committed Feb 20, 2019
1 parent 03d2de4 commit 91740ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"scripts": {
"postinstall": "lerna bootstrap",
"test": "lerna run test --since af73d01e03d817cc4f02c3e75beb4c7112f958e4",
"test": "lerna run test --since 03d2de4987148ae448ecbc0e0ff96c562f2c2d6c",
"publish": "lerna run build && lerna publish"
}
}
2 changes: 1 addition & 1 deletion packages/bodyparser/test/body-parser.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { BodyParserMiddleware } from '../src/BodyParser'
import { config } from '../config'

const PACKAGE_FILE_PATH = join(__dirname, '../package.json')
const PACKAGE_FILE_SIZE = Buffer.byteLength(JSON.stringify(require('../package.json'), null, 2)) + 1
const PACKAGE_FILE_SIZE = Buffer.from(JSON.stringify(require('../package.json'), null, 2), 'utf-8').length + 1

test.group('BodyParser Middleware | generic', () => {
test('do not parse get requests', async (assert) => {
Expand Down

0 comments on commit 91740ae

Please sign in to comment.