Skip to content

Commit 9825e7c

Browse files
pasieronenbrianc
authored andcommitted
Use Buffer.from instead of deprecated Buffer constructor
1 parent 70a8ee1 commit 9825e7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/unit/connection/error-tests.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ suite.test('connection does not emit ECONNRESET errors during disconnect also wh
4444
var server = net.createServer(function (c) {
4545
socket = c
4646
c.once('data', function (data) {
47-
c.write(new Buffer('S', 'utf8'))
47+
c.write(Buffer.from('S'))
4848
})
4949
})
5050

0 commit comments

Comments
 (0)