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: #4562
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
Trott authored and jasnell committed Jan 8, 2016
1 parent e9959ab commit 51e0693
Show file tree
Hide file tree
Showing 13 changed files with 2 additions and 15 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 @@
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-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-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 @@
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 51e0693

Please sign in to comment.