From cd0357bc84b7a14aa9613e3e3db388f6b5a6cce9 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')` on 4 test files * 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 --- 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/);