Skip to content

Commit

Permalink
tests: remove "new Buffer" from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed May 8, 2018
1 parent 036de9a commit d828f6d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/raw.js
Expand Up @@ -182,21 +182,21 @@ describe('bodyParser.raw()', function () {
it('should parse "application/octet-stream"', function (done) {
var test = request(this.server).post('/')
test.set('Content-Type', 'application/octet-stream')
test.write(new Buffer('000102', 'hex'))
test.write(Buffer.from('000102', 'hex'))
test.expect(200, 'buf:000102', done)
})

it('should parse "application/vnd+octets"', function (done) {
var test = request(this.server).post('/')
test.set('Content-Type', 'application/vnd+octets')
test.write(new Buffer('000102', 'hex'))
test.write(Buffer.from('000102', 'hex'))
test.expect(200, 'buf:000102', done)
})

it('should ignore "application/x-foo"', function (done) {
var test = request(this.server).post('/')
test.set('Content-Type', 'application/x-foo')
test.write(new Buffer('000102', 'hex'))
test.write(Buffer.from('000102', 'hex'))
test.expect(200, '{}', done)
})
})
Expand Down

0 comments on commit d828f6d

Please sign in to comment.