Skip to content

Commit 0cf3e10

Browse files
vsemozhetbytMylesBorins
authored andcommitted
test: remove unneeded string splitting
PR-URL: #12992 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Luca Maraschi <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]>
1 parent 6e7b77f commit 0cf3e10

21 files changed

+54
-60
lines changed

test/parallel/test-cluster-dgram-1.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ const dgram = require('dgram');
99

1010

1111
if (common.isWindows) {
12-
common.skip('dgram clustering is currently not supported ' +
13-
'on windows.');
12+
common.skip('dgram clustering is currently not supported on Windows.');
1413
return;
1514
}
1615

test/parallel/test-cluster-dgram-2.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ const assert = require('assert');
99

1010

1111
if (common.isWindows) {
12-
common.skip('dgram clustering is currently not supported ' +
13-
'on windows.');
12+
common.skip('dgram clustering is currently not supported on Windows.');
1413
return;
1514
}
1615

test/parallel/test-cluster-dgram-reuse.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ const cluster = require('cluster');
55
const dgram = require('dgram');
66

77
if (common.isWindows) {
8-
common.skip('dgram clustering is currently not supported ' +
9-
'on windows.');
8+
common.skip('dgram clustering is currently not supported on windows.');
109
return;
1110
}
1211

test/parallel/test-cluster-fork-env.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ if (cluster.isWorker) {
3636

3737
process.once('exit', function() {
3838
assert.ok(checks.using, 'The worker did not receive the correct env.');
39-
assert.ok(checks.overwrite, 'The custom environment did not overwrite ' +
40-
'the existing environment.');
39+
assert.ok(
40+
checks.overwrite,
41+
'The custom environment did not overwrite the existing environment.');
4142
});
4243

4344
}

test/parallel/test-cluster-http-pipe.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ const cluster = require('cluster');
66
const http = require('http');
77

88
if (common.isWindows) {
9-
common.skip('It is not possible to send pipe handles over ' +
10-
'the IPC pipe on Windows');
9+
common.skip(
10+
'It is not possible to send pipe handles over the IPC pipe on Windows');
1111
return;
1212
}
1313

test/parallel/test-cluster-worker-isdead.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@ const assert = require('assert');
55

66
if (cluster.isMaster) {
77
const worker = cluster.fork();
8-
assert.ok(!worker.isDead(),
9-
'isDead() should return false right after the worker has been ' +
10-
'created.');
8+
assert.ok(
9+
!worker.isDead(),
10+
'isDead() should return false right after the worker has been created.');
1111

1212
worker.on('exit', function() {
1313
assert.ok(worker.isDead(),
14-
'After an event has been emitted, ' +
15-
'isDead should return true');
14+
'After an event has been emitted, isDead should return true');
1615
});
1716

1817
worker.on('message', function(msg) {

test/parallel/test-crypto-padding-aes256.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ crypto.DEFAULT_ENCODING = 'buffer';
1313
function aes256(decipherFinal) {
1414
const iv = Buffer.from('00000000000000000000000000000000', 'hex');
1515
const key = Buffer.from('0123456789abcdef0123456789abcdef' +
16-
'0123456789abcdef0123456789abcdef', 'hex');
16+
'0123456789abcdef0123456789abcdef', 'hex');
1717

1818
function encrypt(val, pad) {
1919
const c = crypto.createCipheriv('aes256', key, iv);

test/parallel/test-crypto-padding.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ const EVEN_LENGTH_ENCRYPTED =
4545
// openssl enc -aes-128-cbc -e -K 5333632e722e652e742e4b2e652e5921 \
4646
// -iv 626c616846697a7a3230313142757a7a -nopad | xxd -p -c256
4747
const EVEN_LENGTH_ENCRYPTED_NOPAD =
48-
'7f57859550d4d2fdb9806da2a750461ab46e' +
49-
'71b3d78ebe2d9684dfc87f7575b9';
48+
'7f57859550d4d2fdb9806da2a750461ab46e71b3d78ebe2d9684dfc87f7575b9';
5049

5150

5251
/*

test/parallel/test-domain-stack-empty-in-process-uncaughtexception.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ const assert = require('assert');
77
const d = domain.create();
88

99
process.on('uncaughtException', common.mustCall(function onUncaught() {
10-
assert.strictEqual(process.domain, null,
11-
'domains stack should be empty in uncaughtException' +
12-
' handler');
10+
assert.strictEqual(
11+
process.domain, null,
12+
'domains stack should be empty in uncaughtException handler');
1313
}));
1414

1515
process.on('beforeExit', common.mustCall(function onBeforeExit() {

test/parallel/test-http-expect-continue.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ let sent_continue = false;
1010
let got_continue = false;
1111

1212
function handler(req, res) {
13-
assert.strictEqual(sent_continue, true, 'Full response sent before ' +
14-
'100 Continue');
13+
assert.strictEqual(sent_continue, true,
14+
'Full response sent before 100 Continue');
1515
console.error('Server sending full response...');
1616
res.writeHead(200, {
1717
'Content-Type': 'text/plain',

test/parallel/test-http-url.parse-auth-with-header-in-request.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const server = http.createServer(function(request, response) {
1919

2020
server.listen(0, function() {
2121
const testURL =
22-
url.parse(`http://asdf:qwer@localhost:${this.address().port}`);
22+
url.parse(`http://asdf:qwer@localhost:${this.address().port}`);
2323
// the test here is if you set a specific authorization header in the
2424
// request we should not override that with basic auth
2525
testURL.headers = {

test/parallel/test-http-url.parse-only-support-http-https-protocol.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ assert.throws(function() {
99
http.request(url.parse('file:///whatever'));
1010
}, function(err) {
1111
if (err instanceof Error) {
12-
assert.strictEqual(err.message, 'Protocol "file:" not supported.' +
13-
' Expected "http:"');
12+
assert.strictEqual(
13+
err.message, 'Protocol "file:" not supported. Expected "http:"');
1414
return true;
1515
}
1616
});
@@ -19,8 +19,8 @@ assert.throws(function() {
1919
http.request(url.parse('mailto:[email protected]'));
2020
}, function(err) {
2121
if (err instanceof Error) {
22-
assert.strictEqual(err.message, 'Protocol "mailto:" not supported.' +
23-
' Expected "http:"');
22+
assert.strictEqual(
23+
err.message, 'Protocol "mailto:" not supported. Expected "http:"');
2424
return true;
2525
}
2626
});
@@ -29,8 +29,8 @@ assert.throws(function() {
2929
http.request(url.parse('ftp://www.example.com'));
3030
}, function(err) {
3131
if (err instanceof Error) {
32-
assert.strictEqual(err.message, 'Protocol "ftp:" not supported.' +
33-
' Expected "http:"');
32+
assert.strictEqual(
33+
err.message, 'Protocol "ftp:" not supported. Expected "http:"');
3434
return true;
3535
}
3636
});
@@ -39,8 +39,8 @@ assert.throws(function() {
3939
http.request(url.parse('javascript:alert(\'hello\');'));
4040
}, function(err) {
4141
if (err instanceof Error) {
42-
assert.strictEqual(err.message, 'Protocol "javascript:" not supported.' +
43-
' Expected "http:"');
42+
assert.strictEqual(
43+
err.message, 'Protocol "javascript:" not supported. Expected "http:"');
4444
return true;
4545
}
4646
});
@@ -49,8 +49,8 @@ assert.throws(function() {
4949
http.request(url.parse('xmpp:[email protected]'));
5050
}, function(err) {
5151
if (err instanceof Error) {
52-
assert.strictEqual(err.message, 'Protocol "xmpp:" not supported.' +
53-
' Expected "http:"');
52+
assert.strictEqual(
53+
err.message, 'Protocol "xmpp:" not supported. Expected "http:"');
5454
return true;
5555
}
5656
});
@@ -59,8 +59,8 @@ assert.throws(function() {
5959
http.request(url.parse('f://some.host/path'));
6060
}, function(err) {
6161
if (err instanceof Error) {
62-
assert.strictEqual(err.message, 'Protocol "f:" not supported.' +
63-
' Expected "http:"');
62+
assert.strictEqual(
63+
err.message, 'Protocol "f:" not supported. Expected "http:"');
6464
return true;
6565
}
6666
});

test/parallel/test-intl.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ if (!haveIntl) {
4646

4747
// If list is specified and doesn't contain 'en' then return.
4848
if (process.config.variables.icu_locales && !haveLocale('en')) {
49-
common.skip('detailed Intl tests because English is not ' +
50-
'listed as supported.');
49+
common.skip(
50+
'detailed Intl tests because English is not listed as supported.');
5151
// Smoke test. Does it format anything, or fail?
5252
console.log('Date(0) formatted to: ' + dtf.format(date0));
5353
return;

test/parallel/test-tls-alpn-server-client.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ if (!common.hasCrypto) {
77
}
88

99
if (!process.features.tls_alpn || !process.features.tls_npn) {
10-
common.skip('Skipping because node compiled without NPN or ALPN' +
11-
' feature of OpenSSL.');
10+
common.skip(
11+
'Skipping because node compiled without NPN or ALPN feature of OpenSSL.');
1212
return;
1313
}
1414

test/parallel/test-tls-client-mindhsize.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ function test(size, err, next) {
5353
if (err) {
5454
client.on('error', function(e) {
5555
nerror++;
56-
assert.strictEqual(e.message, 'DH parameter size 1024 is less' +
57-
' than 2048');
56+
assert.strictEqual(e.message,
57+
'DH parameter size 1024 is less than 2048');
5858
server.close();
5959
});
6060
}

test/parallel/test-tls-npn-server-client.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict';
22
if (!process.features.tls_npn) {
3-
common.skip('Skipping because node compiled without NPN feature of' +
4-
' OpenSSL.');
3+
common.skip('Skipping because node compiled without NPN feature of OpenSSL.');
54
return;
65
}
76

test/parallel/test-tls-ocsp-callback.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
const common = require('../common');
33

44
if (!process.features.tls_ocsp) {
5-
common.skip('node compiled without OpenSSL or ' +
6-
'with old OpenSSL version.');
5+
common.skip('node compiled without OpenSSL or with old OpenSSL version.');
76
return;
87
}
98
if (!common.opensslCli) {

test/parallel/test-tls-sni-option.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict';
22
if (!process.features.tls_sni) {
3-
common.skip('node compiled without OpenSSL or ' +
4-
'with old OpenSSL version.');
3+
common.skip('node compiled without OpenSSL or with old OpenSSL version.');
54
return;
65
}
76

test/parallel/test-tls-sni-server-client.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict';
22
if (!process.features.tls_sni) {
3-
common.skip('node compiled without OpenSSL or ' +
4-
'with old OpenSSL version.');
3+
common.skip('node compiled without OpenSSL or with old OpenSSL version.');
54
return;
65
}
76

test/parallel/test-zlib-flush-drain.js

+10-8
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,14 @@ deflater.on('drain', function() {
3737
});
3838

3939
process.once('exit', function() {
40-
assert.strictEqual(beforeFlush, true, 'before calling flush, writable ' +
41-
'stream should need to drain');
42-
assert.strictEqual(afterFlush, false, 'after calling flush, writable ' +
43-
'stream should not need to drain');
44-
assert.strictEqual(drainCount, 1,
45-
'the deflater should have emitted a single drain event');
46-
assert.strictEqual(flushCount, 2,
47-
'flush should be called twice');
40+
assert.strictEqual(
41+
beforeFlush, true,
42+
'before calling flush, writable stream should need to drain');
43+
assert.strictEqual(
44+
afterFlush, false,
45+
'after calling flush, writable stream should not need to drain');
46+
assert.strictEqual(
47+
drainCount, 1, 'the deflater should have emitted a single drain event');
48+
assert.strictEqual(
49+
flushCount, 2, 'flush should be called twice');
4850
});

test/pummel/test-net-timeout.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ const echo_server = net.createServer(function(socket) {
1919
});
2020

2121
socket.on('error', function(e) {
22-
throw new Error('Server side socket should not get error. ' +
23-
'We disconnect willingly.');
22+
throw new Error(
23+
'Server side socket should not get error. We disconnect willingly.');
2424
});
2525

2626
socket.on('data', function(d) {

0 commit comments

Comments
 (0)