From ec3761b1daab9cd0dcc1ea6221040e6c65b2555b Mon Sep 17 00:00:00 2001 From: Zongmin Lei Date: Thu, 22 Jun 2017 01:22:33 +0800 Subject: [PATCH] test: remove `require('buffer')` from 4 test files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove superfluous import from: * test/parallel/test-buffer-fakes.js * test/parallel/test-buffer-includes.js * test/parallel/test-buffer-indexof.js * test/parallel/test-buffer-new.js Refs: https://github.com/nodejs/node/issues/13836 PR-URL: https://github.com/nodejs/node/pull/13846 Reviewed-By: Vse Mozhet Byt Reviewed-By: Alexey Orlenko Reviewed-By: Colin Ihrig Reviewed-By: Benjamin Gruenbaum Reviewed-By: Luigi Pinca Reviewed-By: Jackson Tian Reviewed-By: Refael Ackermann Reviewed-By: James M Snell Reviewed-By: Tobias Nießen --- test/parallel/test-buffer-fakes.js | 1 - test/parallel/test-buffer-includes.js | 2 -- test/parallel/test-buffer-indexof.js | 2 -- test/parallel/test-buffer-new.js | 1 - 4 files changed, 6 deletions(-) diff --git a/test/parallel/test-buffer-fakes.js b/test/parallel/test-buffer-fakes.js index 758ebbf0053732..d126d39aa95263 100644 --- a/test/parallel/test-buffer-fakes.js +++ b/test/parallel/test-buffer-fakes.js @@ -2,7 +2,6 @@ require('../common'); const assert = require('assert'); -const Buffer = require('buffer').Buffer; function FakeBuffer() { } Object.setPrototypeOf(FakeBuffer, Buffer); diff --git a/test/parallel/test-buffer-includes.js b/test/parallel/test-buffer-includes.js index 44e8fe96710b3e..9ce9578b3a1a5d 100644 --- a/test/parallel/test-buffer-includes.js +++ b/test/parallel/test-buffer-includes.js @@ -2,8 +2,6 @@ const common = require('../common'); const assert = require('assert'); -const Buffer = require('buffer').Buffer; - const b = Buffer.from('abcdef'); const buf_a = Buffer.from('a'); const buf_bc = Buffer.from('bc'); diff --git a/test/parallel/test-buffer-indexof.js b/test/parallel/test-buffer-indexof.js index 72505632e3b84e..383c4494739394 100644 --- a/test/parallel/test-buffer-indexof.js +++ b/test/parallel/test-buffer-indexof.js @@ -2,8 +2,6 @@ require('../common'); const assert = require('assert'); -const Buffer = require('buffer').Buffer; - const b = Buffer.from('abcdef'); const buf_a = Buffer.from('a'); const buf_bc = Buffer.from('bc'); diff --git a/test/parallel/test-buffer-new.js b/test/parallel/test-buffer-new.js index 919f31238d2d18..95dd922a271a1a 100644 --- a/test/parallel/test-buffer-new.js +++ b/test/parallel/test-buffer-new.js @@ -2,6 +2,5 @@ require('../common'); const assert = require('assert'); -const Buffer = require('buffer').Buffer; assert.throws(() => new Buffer(42, 'utf8'), /first argument must be a string/);