From b91a0d1a58fbbe10963ec2cc6679b8e571058ca1 Mon Sep 17 00:00:00 2001 From: lena Date: Wed, 21 Jun 2017 20:59:12 +0300 Subject: [PATCH 1/4] remove unneccessary Buffer require --- test/parallel/test-buffer-zero-fill.js | 1 - 1 file changed, 1 deletion(-) diff --git a/test/parallel/test-buffer-zero-fill.js b/test/parallel/test-buffer-zero-fill.js index adc011869138dd..1aca4e9a5c438e 100644 --- a/test/parallel/test-buffer-zero-fill.js +++ b/test/parallel/test-buffer-zero-fill.js @@ -2,7 +2,6 @@ require('../common'); const assert = require('assert'); -const Buffer = require('buffer').Buffer; const buf1 = Buffer(100); const buf2 = new Buffer(100); From 4362d0897c066cccf0c0365002110d79fbab185c Mon Sep 17 00:00:00 2001 From: lena Date: Wed, 21 Jun 2017 21:19:16 +0300 Subject: [PATCH 2/4] some more removed BUffer requiress --- test/parallel/test-buffer-nopendingdep-map.js | 3 +-- test/parallel/test-buffer-pending-deprecation.js | 1 - test/parallel/test-buffer-sharedarraybuffer.js | 2 -- test/parallel/test-buffer-slow.js | 1 - test/parallel/test-buffer-tojson.js | 1 - 5 files changed, 1 insertion(+), 7 deletions(-) diff --git a/test/parallel/test-buffer-nopendingdep-map.js b/test/parallel/test-buffer-nopendingdep-map.js index 90a24a625bf748..6ddfc5855bbc89 100644 --- a/test/parallel/test-buffer-nopendingdep-map.js +++ b/test/parallel/test-buffer-nopendingdep-map.js @@ -1,8 +1,7 @@ -// Flags: --no-warnings --pending-deprecation + // Flags: --no-warnings --pending-deprecation 'use strict'; const common = require('../common'); -const Buffer = require('buffer').Buffer; process.on('warning', common.mustNotCall('A warning should not be emitted')); diff --git a/test/parallel/test-buffer-pending-deprecation.js b/test/parallel/test-buffer-pending-deprecation.js index e8aabc49fe0bda..060eae2a51622e 100644 --- a/test/parallel/test-buffer-pending-deprecation.js +++ b/test/parallel/test-buffer-pending-deprecation.js @@ -2,7 +2,6 @@ 'use strict'; const common = require('../common'); -const Buffer = require('buffer').Buffer; const bufferWarning = 'The Buffer() and new Buffer() constructors are not ' + 'recommended for use due to security and usability ' + diff --git a/test/parallel/test-buffer-sharedarraybuffer.js b/test/parallel/test-buffer-sharedarraybuffer.js index f1bac72079b313..db4ea1b0090af2 100644 --- a/test/parallel/test-buffer-sharedarraybuffer.js +++ b/test/parallel/test-buffer-sharedarraybuffer.js @@ -3,8 +3,6 @@ // Flags: --harmony-sharedarraybuffer require('../common'); -const assert = require('assert'); -const Buffer = require('buffer').Buffer; const sab = new SharedArrayBuffer(24); const arr1 = new Uint16Array(sab); diff --git a/test/parallel/test-buffer-slow.js b/test/parallel/test-buffer-slow.js index bb944ae4de784b..82fa17707dfee7 100644 --- a/test/parallel/test-buffer-slow.js +++ b/test/parallel/test-buffer-slow.js @@ -3,7 +3,6 @@ const common = require('../common'); const assert = require('assert'); const buffer = require('buffer'); -const Buffer = buffer.Buffer; const SlowBuffer = buffer.SlowBuffer; const ones = [1, 1, 1, 1]; diff --git a/test/parallel/test-buffer-tojson.js b/test/parallel/test-buffer-tojson.js index ae31e8f5a5abb3..d9a4a85e812cfb 100644 --- a/test/parallel/test-buffer-tojson.js +++ b/test/parallel/test-buffer-tojson.js @@ -2,7 +2,6 @@ require('../common'); const assert = require('assert'); -const Buffer = require('buffer').Buffer; { assert.strictEqual(JSON.stringify(Buffer.alloc(0)), From 7280f77cfdebe8e8cfed687aa4cc47c428089793 Mon Sep 17 00:00:00 2001 From: lena Date: Thu, 22 Jun 2017 08:34:35 +0300 Subject: [PATCH 3/4] fix indentation --- test/parallel/test-buffer-nopendingdep-map.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-buffer-nopendingdep-map.js b/test/parallel/test-buffer-nopendingdep-map.js index 6ddfc5855bbc89..c85d184fbc1246 100644 --- a/test/parallel/test-buffer-nopendingdep-map.js +++ b/test/parallel/test-buffer-nopendingdep-map.js @@ -1,4 +1,4 @@ - // Flags: --no-warnings --pending-deprecation +// Flags: --no-warnings --pending-deprecation 'use strict'; const common = require('../common'); From b5377a3e44812a309d1f3362d874d56157ac5c5d Mon Sep 17 00:00:00 2001 From: lenakaplan Date: Thu, 22 Jun 2017 14:32:27 +0300 Subject: [PATCH 4/4] added back assert --- test/parallel/test-buffer-sharedarraybuffer.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/parallel/test-buffer-sharedarraybuffer.js b/test/parallel/test-buffer-sharedarraybuffer.js index db4ea1b0090af2..582841d679c8d1 100644 --- a/test/parallel/test-buffer-sharedarraybuffer.js +++ b/test/parallel/test-buffer-sharedarraybuffer.js @@ -3,6 +3,7 @@ // Flags: --harmony-sharedarraybuffer require('../common'); +const assert = require('assert'); const sab = new SharedArrayBuffer(24); const arr1 = new Uint16Array(sab);