summaryrefslogtreecommitdiff
path: root/test/parallel/test-dgram-send-default-host.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-dgram-send-default-host.js')
-rw-r--r--test/parallel/test-dgram-send-default-host.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/parallel/test-dgram-send-default-host.js b/test/parallel/test-dgram-send-default-host.js
index 0d49322513..e6b6d7c9b4 100644
--- a/test/parallel/test-dgram-send-default-host.js
+++ b/test/parallel/test-dgram-send-default-host.js
@@ -6,11 +6,10 @@ const dgram = require('dgram');
const client = dgram.createSocket('udp4');
-const toSend = [new Buffer(256), new Buffer(256), new Buffer(256), 'hello'];
-
-toSend[0].fill('x');
-toSend[1].fill('y');
-toSend[2].fill('z');
+const toSend = [Buffer.alloc(256, 'x'),
+ Buffer.alloc(256, 'y'),
+ Buffer.alloc(256, 'z'),
+ 'hello'];
client.on('listening', function() {
client.send(toSend[0], 0, toSend[0].length, common.PORT);