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 <info@bnoordhuis.nl> Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

0 commit comments

Comments
 (0)