From 4a6604193f09c8a195d5671dd3ca4cb1ef9a7e40 Mon Sep 17 00:00:00 2001 From: sallen450 Date: Thu, 22 Jun 2017 00:49:58 +0800 Subject: [PATCH] test: remove require('buffer') on 6 fs test files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * test/parallel/test-fs-mkdtemp.js * test/parallel/test-fs-read-zero-length.js * test/parallel/test-fs-read.js * test/parallel/test-fs-whatwg-url.js * test/parallel/test-fs-write-string-coerce.js * test/parallel/test-fs-write.js PR-URL: https://github.com/nodejs/node/pull/13845 Refs: https://github.com/nodejs/node/issues/13836 Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Benjamin Gruenbaum Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Tobias Nießen Reviewed-By: Alexey Orlenko Reviewed-By: Michael Dawson Reviewed-By: Vse Mozhet Byt --- test/parallel/test-fs-mkdtemp.js | 1 - test/parallel/test-fs-read-zero-length.js | 1 - test/parallel/test-fs-read.js | 1 - test/parallel/test-fs-whatwg-url.js | 1 - test/parallel/test-fs-write-string-coerce.js | 1 - test/parallel/test-fs-write.js | 1 - 6 files changed, 6 deletions(-) diff --git a/test/parallel/test-fs-mkdtemp.js b/test/parallel/test-fs-mkdtemp.js index d4773aa37b7bf5..5ce340afa5ad0f 100644 --- a/test/parallel/test-fs-mkdtemp.js +++ b/test/parallel/test-fs-mkdtemp.js @@ -4,7 +4,6 @@ const common = require('../common'); const assert = require('assert'); const fs = require('fs'); const path = require('path'); -const Buffer = require('buffer').Buffer; common.refreshTmpDir(); diff --git a/test/parallel/test-fs-read-zero-length.js b/test/parallel/test-fs-read-zero-length.js index 328726a23bc4f8..8017e1c5c76684 100644 --- a/test/parallel/test-fs-read-zero-length.js +++ b/test/parallel/test-fs-read-zero-length.js @@ -2,7 +2,6 @@ const common = require('../common'); const assert = require('assert'); const path = require('path'); -const Buffer = require('buffer').Buffer; const fs = require('fs'); const filepath = path.join(common.fixturesDir, 'x.txt'); const fd = fs.openSync(filepath, 'r'); diff --git a/test/parallel/test-fs-read.js b/test/parallel/test-fs-read.js index 6744627737a549..4fb40f052b2af3 100644 --- a/test/parallel/test-fs-read.js +++ b/test/parallel/test-fs-read.js @@ -23,7 +23,6 @@ const common = require('../common'); const assert = require('assert'); const path = require('path'); -const Buffer = require('buffer').Buffer; const fs = require('fs'); const filepath = path.join(common.fixturesDir, 'x.txt'); const fd = fs.openSync(filepath, 'r'); diff --git a/test/parallel/test-fs-whatwg-url.js b/test/parallel/test-fs-whatwg-url.js index ff2ee641e12a7e..3f7be7f7809beb 100644 --- a/test/parallel/test-fs-whatwg-url.js +++ b/test/parallel/test-fs-whatwg-url.js @@ -6,7 +6,6 @@ const path = require('path'); const fs = require('fs'); const os = require('os'); const URL = require('url').URL; -const Buffer = require('buffer').Buffer; function pathToFileURL(p) { if (!path.isAbsolute(p)) diff --git a/test/parallel/test-fs-write-string-coerce.js b/test/parallel/test-fs-write-string-coerce.js index 58fe197a838f57..1af93ff269219e 100644 --- a/test/parallel/test-fs-write-string-coerce.js +++ b/test/parallel/test-fs-write-string-coerce.js @@ -2,7 +2,6 @@ const common = require('../common'); const assert = require('assert'); const path = require('path'); -const Buffer = require('buffer').Buffer; const fs = require('fs'); common.refreshTmpDir(); diff --git a/test/parallel/test-fs-write.js b/test/parallel/test-fs-write.js index e8e31e22fb13f6..fd0e6b768da042 100644 --- a/test/parallel/test-fs-write.js +++ b/test/parallel/test-fs-write.js @@ -23,7 +23,6 @@ const common = require('../common'); const assert = require('assert'); const path = require('path'); -const Buffer = require('buffer').Buffer; const fs = require('fs'); const fn = path.join(common.tmpDir, 'write.txt'); const fn2 = path.join(common.tmpDir, 'write2.txt');