Skip to content

Commit

Permalink
test: remove unused util imports
Browse files Browse the repository at this point in the history
A number of tests in `test/parallel` were importing the `util` module
via `require()` but not using `util` for anything. This removes those
`require()` statements.

PR-URL: #4397
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rod Vagg <[email protected]>
  • Loading branch information
Trott committed Dec 25, 2015
1 parent fdeb862 commit 3311267
Show file tree
Hide file tree
Showing 18 changed files with 2 additions and 20 deletions.
1 change: 0 additions & 1 deletion test/parallel/test-beforeexit-event.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';
var assert = require('assert');
var net = require('net');
var util = require('util');
var common = require('../common');
var revivals = 0;
var deaths = 0;
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-child-process-fork-regr-gh-2847.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const assert = require('assert');

const cluster = require('cluster');
const net = require('net');
const util = require('util');

var connectcount = 0;
var sendcount = 0;
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-cluster-worker-isconnected.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
require('../common');
var cluster = require('cluster');
var assert = require('assert');
var util = require('util');

if (cluster.isMaster) {
var worker = cluster.fork();
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-file-write-stream2.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ var assert = require('assert');

var path = require('path');
var fs = require('fs');
var util = require('util');


var filepath = path.join(common.tmpDir, 'write.txt');
Expand Down
3 changes: 1 addition & 2 deletions test/parallel/test-file-write-stream3.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ var common = require('../common');
var assert = require('assert');

var path = require('path'),
fs = require('fs'),
util = require('util');
fs = require('fs');


var filepath = path.join(common.tmpDir, 'write_pos.txt');
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-http-buffer-sanity.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
var common = require('../common');
var assert = require('assert');
var http = require('http');
var util = require('util');

var bufferSize = 5 * 1024 * 1024;
var measuredSize = 0;
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-http-head-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
var common = require('../common');
var assert = require('assert');
var http = require('http');
var util = require('util');


var body = 'hello world\n';
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-http-keep-alive-close-on-header.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
var common = require('../common');
var assert = require('assert');
var http = require('http');
var util = require('util');

var body = 'hello world\n';
var headers = {'connection': 'keep-alive'};
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-pipe-return-val.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
var common = require('../common');
var Stream = require('stream').Stream;
var assert = require('assert');
var util = require('util');

var sourceStream = new Stream();
var destStream = new Stream();
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-repl-.save.load.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';
var assert = require('assert');
var util = require('util');
var join = require('path').join;
var fs = require('fs');
var common = require('../common');
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-repl-domain.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
var assert = require('assert');
var common = require('../common');

var util = require('util');
var repl = require('repl');

const putIn = new common.ArrayStream();
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-repl-persistent-history.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const stream = require('stream');
const REPL = require('internal/repl');
const assert = require('assert');
const fs = require('fs');
const util = require('util');
const path = require('path');
const os = require('os');

Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-repl-syntax-error-stack.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const common = require('../common');
const assert = require('assert');
const path = require('path');
const repl = require('repl');
const util = require('util');
let found = false;

process.on('exit', () => {
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-repl-tab-complete-crash.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

const common = require('../common');
const assert = require('assert');
const util = require('util');
const repl = require('repl');

var referenceErrorCount = 0;
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-repl-tab-complete.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

var common = require('../common');
var assert = require('assert');
var util = require('util');
var repl = require('repl');
var referenceErrors = 0;
var expectedReferenceErrors = 0;
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-repl-tab.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';
require('../common');
var assert = require('assert');
var util = require('util');
var repl = require('repl');
var zlib = require('zlib');

Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-stream2-push.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ var Readable = stream.Readable;
var Writable = stream.Writable;
var assert = require('assert');

var util = require('util');
var EE = require('events').EventEmitter;


Expand Down
3 changes: 1 addition & 2 deletions test/parallel/test-url.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
var common = require('../common');
var assert = require('assert');

var url = require('url'),
util = require('util');
var url = require('url');

// URLs to parse, and expected data
// { url : parsed }
Expand Down

0 comments on commit 3311267

Please sign in to comment.