Skip to content

Commit 79c865a

Browse files
committed
test: changing process.exit to return while skipping tests
This patch uses `return` statement to skip the test instead of using `process.exit` call. PR-URL: #2109 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Johan Bergström <[email protected]>
1 parent 69298d3 commit 79c865a

File tree

151 files changed

+165
-165
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+165
-165
lines changed

test/internet/test-http-https-default-ports.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var assert = require('assert');
44

55
if (!common.hasCrypto) {
66
console.log('1..0 # Skipped: missing crypto');
7-
process.exit();
7+
return;
88
}
99
var https = require('https');
1010

test/internet/test-tls-connnect-cnnic.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
var common = require('../common');
1212
if (!common.hasCrypto) {
1313
console.log('1..0 # Skipped: missing crypto');
14-
process.exit();
14+
return;
1515
}
1616

1717
var tls = require('tls');

test/internet/test-tls-connnect-melissadata.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
var common = require('../common');
66
if (!common.hasCrypto) {
77
console.log('1..0 # Skipped: missing crypto');
8-
process.exit();
8+
return;
99
}
1010

1111
var tls = require('tls');

test/internet/test-tls-reuse-host-from-socket.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var assert = require('assert');
44

55
if (!common.hasCrypto) {
66
console.log('1..0 # Skipped: missing crypto');
7-
process.exit();
7+
return;
88
}
99
var tls = require('tls');
1010

test/parallel/test-cluster-bind-privileged-port.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var net = require('net');
66

77
if (process.platform === 'win32') {
88
console.log('1..0 # Skipped: not reliable on Windows.');
9-
process.exit(0);
9+
return;
1010
}
1111

1212
if (process.getuid() === 0) {

test/parallel/test-cluster-disconnect-unshared-udp.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22
if (process.platform === 'win32') {
33
console.log('1..0 # Skipped: on windows, because clustered dgram is ENOTSUP');
4-
process.exit(0);
4+
return;
55
}
66

77
var cluster = require('cluster');

test/parallel/test-cluster-shared-handle-bind-privileged-port.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ var net = require('net');
66

77
if (process.platform === 'win32') {
88
console.log('1..0 # Skipped: not reliable on Windows');
9-
process.exit(0);
9+
return;
1010
}
1111

1212
if (process.getuid() === 0) {
1313
console.log('1..0 # Skipped: as this test should not be run as `root`');
14-
process.exit(0);
14+
return;
1515
}
1616

1717
if (cluster.isMaster) {

test/parallel/test-crypto-authenticated.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var assert = require('assert');
44

55
if (!common.hasCrypto) {
66
console.log('1..0 # Skipped: missing crypto');
7-
process.exit();
7+
return;
88
}
99
var crypto = require('crypto');
1010

test/parallel/test-crypto-binary-default.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var constants = require('constants');
99

1010
if (!common.hasCrypto) {
1111
console.log('1..0 # Skipped: missing crypto');
12-
process.exit();
12+
return;
1313
}
1414
var crypto = require('crypto');
1515
var tls = require('tls');

test/parallel/test-crypto-certificate.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var assert = require('assert');
44

55
if (!common.hasCrypto) {
66
console.log('1..0 # Skipped: missing crypto');
7-
process.exit();
7+
return;
88
}
99
var crypto = require('crypto');
1010

test/parallel/test-crypto-cipher-decipher.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var assert = require('assert');
44

55
if (!common.hasCrypto) {
66
console.log('1..0 # Skipped: missing crypto');
7-
process.exit();
7+
return;
88
}
99
var crypto = require('crypto');
1010

test/parallel/test-crypto-dh-odd-key.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var assert = require('assert');
44

55
if (!common.hasCrypto) {
66
console.log('1..0 # Skipped: missing crypto');
7-
process.exit();
7+
return;
88
}
99
var crypto = require('crypto');
1010

test/parallel/test-crypto-dh.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var constants = require('constants');
55

66
if (!common.hasCrypto) {
77
console.log('1..0 # Skipped: missing crypto');
8-
process.exit();
8+
return;
99
}
1010
var crypto = require('crypto');
1111

test/parallel/test-crypto-domain.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var domain = require('domain');
55

66
if (!common.hasCrypto) {
77
console.log('1..0 # Skipped: missing crypto');
8-
process.exit();
8+
return;
99
}
1010
var crypto = require('crypto');
1111

test/parallel/test-crypto-domains.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var errors = 0;
88

99
if (!common.hasCrypto) {
1010
console.log('1..0 # Skipped: missing crypto');
11-
process.exit();
11+
return;
1212
}
1313
var crypto = require('crypto');
1414

test/parallel/test-crypto-ecb.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var assert = require('assert');
44

55
if (!common.hasCrypto) {
66
console.log('1..0 # Skipped: missing crypto');
7-
process.exit();
7+
return;
88
}
99
var crypto = require('crypto');
1010

test/parallel/test-crypto-from-binary.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var assert = require('assert');
88

99
if (!common.hasCrypto) {
1010
console.log('1..0 # Skipped: missing crypto');
11-
process.exit();
11+
return;
1212
}
1313
var crypto = require('crypto');
1414

test/parallel/test-crypto-hash-stream-pipe.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var assert = require('assert');
44

55
if (!common.hasCrypto) {
66
console.log('1..0 # Skipped: missing crypto');
7-
process.exit();
7+
return;
88
}
99
var crypto = require('crypto');
1010

test/parallel/test-crypto-hash.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var path = require('path');
66

77
if (!common.hasCrypto) {
88
console.log('1..0 # Skipped: missing crypto');
9-
process.exit();
9+
return;
1010
}
1111
var crypto = require('crypto');
1212

test/parallel/test-crypto-hmac.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var assert = require('assert');
44

55
if (!common.hasCrypto) {
66
console.log('1..0 # Skipped: missing crypto');
7-
process.exit();
7+
return;
88
}
99
var crypto = require('crypto');
1010

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var assert = require('assert');
44

55
if (!common.hasCrypto) {
66
console.log('1..0 # Skipped: missing crypto');
7-
process.exit();
7+
return;
88
}
99
var crypto = require('crypto');
1010

test/parallel/test-crypto-padding.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var assert = require('assert');
44

55
if (!common.hasCrypto) {
66
console.log('1..0 # Skipped: missing crypto');
7-
process.exit();
7+
return;
88
}
99
var crypto = require('crypto');
1010

test/parallel/test-crypto-pbkdf2.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var assert = require('assert');
44

55
if (!common.hasCrypto) {
66
console.log('1..0 # Skipped: missing crypto');
7-
process.exit();
7+
return;
88
}
99
var crypto = require('crypto');
1010

test/parallel/test-crypto-random.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var assert = require('assert');
44

55
if (!common.hasCrypto) {
66
console.log('1..0 # Skipped: missing crypto');
7-
process.exit();
7+
return;
88
}
99
var crypto = require('crypto');
1010

test/parallel/test-crypto-rsa-dsa.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var constants = require('constants');
66

77
if (!common.hasCrypto) {
88
console.log('1..0 # Skipped: missing crypto');
9-
process.exit();
9+
return;
1010
}
1111
var crypto = require('crypto');
1212

test/parallel/test-crypto-sign-verify.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var fs = require('fs');
55

66
if (!common.hasCrypto) {
77
console.log('1..0 # Skipped: missing crypto');
8-
process.exit();
8+
return;
99
}
1010
var crypto = require('crypto');
1111

test/parallel/test-crypto-stream.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var util = require('util');
66

77
if (!common.hasCrypto) {
88
console.log('1..0 # Skipped: missing crypto');
9-
process.exit();
9+
return;
1010
}
1111
var crypto = require('crypto');
1212

test/parallel/test-crypto-verify-failure.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var assert = require('assert');
44

55
if (!common.hasCrypto) {
66
console.log('1..0 # Skipped: missing crypto');
7-
process.exit();
7+
return;
88
}
99
var crypto = require('crypto');
1010
var tls = require('tls');

test/parallel/test-crypto.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var util = require('util');
55

66
if (!common.hasCrypto) {
77
console.log('1..0 # Skipped: missing crypto');
8-
process.exit();
8+
return;
99
}
1010
var crypto = require('crypto');
1111

test/parallel/test-dgram-bind-default-address.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var dgram = require('dgram');
66
// skip test in FreeBSD jails since 0.0.0.0 will resolve to default interface
77
if (common.inFreeBSDJail) {
88
console.log('1..0 # Skipped: In a FreeBSD jail');
9-
process.exit();
9+
return;
1010
}
1111

1212
dgram.createSocket('udp4').bind(common.PORT + 0, common.mustCall(function() {

test/parallel/test-fs-readfile-error.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var path = require('path');
88
// the directory there.
99
if (process.platform === 'freebsd') {
1010
console.log('1..0 # Skipped: platform not supported.');
11-
process.exit();
11+
return;
1212
}
1313

1414
var callbacks = 0;

test/parallel/test-fs-readfile-pipe-large.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var path = require('path');
77

88
if (process.platform === 'win32') {
99
console.log('1..0 # Skipped: No /dev/stdin on windows.');
10-
process.exit();
10+
return;
1111
}
1212

1313
var fs = require('fs');

test/parallel/test-fs-readfile-pipe.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var assert = require('assert');
66

77
if (process.platform === 'win32') {
88
console.log('1..0 # Skipped: No /dev/stdin on windows.');
9-
process.exit();
9+
return;
1010
}
1111

1212
var fs = require('fs');

test/parallel/test-fs-readfilesync-pipe-large.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var path = require('path');
77

88
if (process.platform === 'win32') {
99
console.log('1..0 # Skipped: No /dev/stdin on windows.');
10-
process.exit();
10+
return;
1111
}
1212

1313
var fs = require('fs');

test/parallel/test-http-curl-chunk-problem.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var common = require('../common');
33
var assert = require('assert');
44
if (!common.opensslCli) {
55
console.log('1..0 # Skipped: node compiled without OpenSSL CLI.');
6-
process.exit(0);
6+
return;
77
}
88

99
// http://groups.google.com/group/nodejs/browse_thread/thread/f66cd3c960406919

test/parallel/test-http-localaddress.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var http = require('http'),
55

66
if (!common.hasMultiLocalhost()) {
77
console.log('1..0 # Skipped: platform-specific test.');
8-
process.exit();
8+
return;
99
}
1010

1111
var server = http.createServer(function(req, res) {

test/parallel/test-http-url.parse-https.request.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var assert = require('assert');
44

55
if (!common.hasCrypto) {
66
console.log('1..0 # Skipped: missing crypto');
7-
process.exit();
7+
return;
88
}
99
var https = require('https');
1010

test/parallel/test-https-agent-servername.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var assert = require('assert');
44

55
if (!common.hasCrypto) {
66
console.log('1..0 # Skipped: missing crypto');
7-
process.exit();
7+
return;
88
}
99

1010
var https = require('https');

test/parallel/test-https-agent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var assert = require('assert');
44

55
if (!common.hasCrypto) {
66
console.log('1..0 # Skipped: missing crypto');
7-
process.exit();
7+
return;
88
}
99
var https = require('https');
1010

test/parallel/test-https-byteswritten.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var http = require('http');
66

77
if (!common.hasCrypto) {
88
console.log('1..0 # Skipped: missing crypto');
9-
process.exit();
9+
return;
1010
}
1111
var https = require('https');
1212

test/parallel/test-https-client-checkServerIdentity.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var assert = require('assert');
44

55
if (!common.hasCrypto) {
66
console.log('1..0 # Skipped: missing crypto');
7-
process.exit();
7+
return;
88
}
99
var https = require('https');
1010

test/parallel/test-https-client-get-url.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var assert = require('assert');
77

88
if (!common.hasCrypto) {
99
console.log('1..0 # Skipped: missing crypto');
10-
process.exit();
10+
return;
1111
}
1212
var https = require('https');
1313

test/parallel/test-https-client-reject.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var assert = require('assert');
44

55
if (!common.hasCrypto) {
66
console.log('1..0 # Skipped: missing crypto');
7-
process.exit();
7+
return;
88
}
99
var https = require('https');
1010

0 commit comments

Comments
 (0)