From d828f6dca80423e61e6f4dc96456637d77902a56 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Tue, 8 May 2018 14:00:55 -0400 Subject: [PATCH] tests: remove "new Buffer" from tests --- test/raw.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/raw.js b/test/raw.js index 35d8937e..e019e778 100644 --- a/test/raw.js +++ b/test/raw.js @@ -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) }) })