From 47dd8f023f4f0d83c33a7528fcffae5bb6782589 Mon Sep 17 00:00:00 2001 From: XadillaX Date: Thu, 22 Jun 2017 00:38:31 +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 We don't use the global Buffer throughout the lib/ to avoid circular dependency issues in core, but we actually don't need to require it on test files. So remove them on: + test/parallel/test-stream-uint8array.js + test/parallel/test-stream2-finish-pipe.js + test/parallel/test-tls-session-cache.js + test/parallel/test-vm-cached-data.js Refs: https://github.com/nodejs/node/issues/13836 PR-URL: https://github.com/nodejs/node/pull/13844 Reviewed-By: Vse Mozhet Byt Reviewed-By: Alexey Orlenko Reviewed-By: Colin Ihrig Reviewed-By: Benjamin Gruenbaum Reviewed-By: Luigi Pinca Reviewed-By: Timothy Gu Reviewed-By: James M Snell Reviewed-By: Tobias Nießen Reviewed-By: Michael Dawson --- test/parallel/test-stream2-finish-pipe.js | 1 - test/parallel/test-vm-cached-data.js | 1 - 2 files changed, 2 deletions(-) diff --git a/test/parallel/test-stream2-finish-pipe.js b/test/parallel/test-stream2-finish-pipe.js index 87edf5a5fa6437..d3e84eb6b47398 100644 --- a/test/parallel/test-stream2-finish-pipe.js +++ b/test/parallel/test-stream2-finish-pipe.js @@ -1,7 +1,6 @@ 'use strict'; require('../common'); const stream = require('stream'); -const Buffer = require('buffer').Buffer; const r = new stream.Readable(); r._read = function(size) { diff --git a/test/parallel/test-vm-cached-data.js b/test/parallel/test-vm-cached-data.js index c4fa55cb0b2a6d..cedc68bea06372 100644 --- a/test/parallel/test-vm-cached-data.js +++ b/test/parallel/test-vm-cached-data.js @@ -3,7 +3,6 @@ require('../common'); const assert = require('assert'); const vm = require('vm'); const spawnSync = require('child_process').spawnSync; -const Buffer = require('buffer').Buffer; function getSource(tag) { return `(function ${tag}() { return '${tag}'; })`;