From e42b1b16b72904ca5d9abc2a4023303c809ec561 Mon Sep 17 00:00:00 2001 From: Steven Winston Date: Wed, 21 Jun 2017 23:53:52 +0300 Subject: [PATCH] test: remove unnecessary Buffer import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed require('buffer') from - test/disabled/test-sendfd.js - test/internet/test-dgram-broadcast-multi-process.js - test/pummel/test-https-no-reader.js PR-URL: https://github.com/nodejs/node/pull/13860 Refs: https://github.com/nodejs/node/issues/13836 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Refael Ackermann Reviewed-By: James M Snell Reviewed-By: Timothy Gu Reviewed-By: Colin Ihrig Reviewed-By: Tobias Nießen Reviewed-By: Alexey Orlenko Reviewed-By: Michael Dawson Reviewed-By: Vse Mozhet Byt --- test/disabled/test-sendfd.js | 3 +-- test/internet/test-dgram-broadcast-multi-process.js | 1 - test/pummel/test-https-no-reader.js | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/test/disabled/test-sendfd.js b/test/disabled/test-sendfd.js index 89367369bb..3352e63532 100644 --- a/test/disabled/test-sendfd.js +++ b/test/disabled/test-sendfd.js @@ -50,7 +50,6 @@ const common = require('../common'); const assert = require('assert'); -const buffer = require('buffer'); const child_process = require('child_process'); const fs = require('fs'); const net = require('net'); @@ -112,7 +111,7 @@ var srv = net.createServer(function(s) { var str = JSON.stringify(DATA) + '\n'; DATA.ord = DATA.ord + 1; - var buf = buffer.Buffer.allocUnsafe(str.length); + var buf = Buffer.allocUnsafe(str.length); buf.write(JSON.stringify(DATA) + '\n', 'utf8'); s.write(str, 'utf8', pipeFDs[1]); diff --git a/test/internet/test-dgram-broadcast-multi-process.js b/test/internet/test-dgram-broadcast-multi-process.js index a79c05e18e..79e1392484 100644 --- a/test/internet/test-dgram-broadcast-multi-process.js +++ b/test/internet/test-dgram-broadcast-multi-process.js @@ -25,7 +25,6 @@ const assert = require('assert'); const dgram = require('dgram'); const util = require('util'); const networkInterfaces = require('os').networkInterfaces(); -const Buffer = require('buffer').Buffer; const fork = require('child_process').fork; const LOCAL_BROADCAST_HOST = '255.255.255.255'; const TIMEOUT = common.platformTimeout(5000); diff --git a/test/pummel/test-https-no-reader.js b/test/pummel/test-https-no-reader.js index 2a446bfbdd..cc77993a73 100644 --- a/test/pummel/test-https-no-reader.js +++ b/test/pummel/test-https-no-reader.js @@ -29,7 +29,6 @@ if (!common.hasCrypto) { } const https = require('https'); -const Buffer = require('buffer').Buffer; const fs = require('fs'); const path = require('path');