From c3c6699bb36c5a47fe2323c2182a49402ce37f6a Mon Sep 17 00:00:00 2001 From: OriLev Date: Wed, 21 Jun 2017 21:40:25 +0300 Subject: [PATCH] test: remove require('buffer') from 4 buffer tests Remove superfluous import from: * test/parallel/test-buffer-alloc.js * test/parallel/test-buffer-arraybuffer.js * test/parallel/test-buffer-badhex.js * test/parallel/test-buffer-bytelength.js Refs: https://github.com/nodejs/node/issues/13836 PR-URL: https://github.com/nodejs/node/pull/13855 Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Vse Mozhet Byt Reviewed-By: Alexey Orlenko Reviewed-By: James M Snell --- test/parallel/test-buffer-alloc.js | 4 +--- test/parallel/test-buffer-arraybuffer.js | 1 - test/parallel/test-buffer-badhex.js | 1 - test/parallel/test-buffer-bytelength.js | 1 - 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/test/parallel/test-buffer-alloc.js b/test/parallel/test-buffer-alloc.js index 7016d07f7adef5..b5318110fa7182 100644 --- a/test/parallel/test-buffer-alloc.js +++ b/test/parallel/test-buffer-alloc.js @@ -3,9 +3,7 @@ const common = require('../common'); const assert = require('assert'); const vm = require('vm'); -const buffer = require('buffer'); -const Buffer = buffer.Buffer; -const SlowBuffer = buffer.SlowBuffer; +const SlowBuffer = require('buffer').SlowBuffer; const b = Buffer.allocUnsafe(1024); diff --git a/test/parallel/test-buffer-arraybuffer.js b/test/parallel/test-buffer-arraybuffer.js index 7ef25fec001c89..8f89c4976ceac3 100644 --- a/test/parallel/test-buffer-arraybuffer.js +++ b/test/parallel/test-buffer-arraybuffer.js @@ -3,7 +3,6 @@ require('../common'); const assert = require('assert'); -const Buffer = require('buffer').Buffer; const LENGTH = 16; const ab = new ArrayBuffer(LENGTH); diff --git a/test/parallel/test-buffer-badhex.js b/test/parallel/test-buffer-badhex.js index c3d151ba18c694..94de97181d38e0 100644 --- a/test/parallel/test-buffer-badhex.js +++ b/test/parallel/test-buffer-badhex.js @@ -1,7 +1,6 @@ 'use strict'; require('../common'); const assert = require('assert'); -const Buffer = require('buffer').Buffer; // Test hex strings and bad hex strings { diff --git a/test/parallel/test-buffer-bytelength.js b/test/parallel/test-buffer-bytelength.js index 8077cc7d5e2663..bdefdee71d3f4c 100644 --- a/test/parallel/test-buffer-bytelength.js +++ b/test/parallel/test-buffer-bytelength.js @@ -2,7 +2,6 @@ require('../common'); const assert = require('assert'); -const Buffer = require('buffer').Buffer; const SlowBuffer = require('buffer').SlowBuffer; const vm = require('vm');