summaryrefslogtreecommitdiff
path: root/test/parallel/test-vm-sigint-existing-handler.js
diff options
context:
space:
mode:
authorVse Mozhet Byt <vsemozhetbyt@gmail.com>2017-07-01 02:29:09 +0300
committerVse Mozhet Byt <vsemozhetbyt@gmail.com>2017-07-04 12:41:49 +0300
commit2d2986ae72f2f5c63d95a94f05fa996d9f0609f1 (patch)
tree7a92ba45eb1ec041a2f9e40b0e63ac5c0be409c0 /test/parallel/test-vm-sigint-existing-handler.js
parentcc1a47dc6b94b2feb4de9e46be9333d81d537783 (diff)
downloadandroid-node-v8-2d2986ae72f2f5c63d95a94f05fa996d9f0609f1.tar.gz
android-node-v8-2d2986ae72f2f5c63d95a94f05fa996d9f0609f1.tar.bz2
android-node-v8-2d2986ae72f2f5c63d95a94f05fa996d9f0609f1.zip
test: simplify test skipping
* Make common.skip() exit. Also add common.printSkipMessage() for partial skips. * Don't make needless things before skip PR-URL: https://github.com/nodejs/node/pull/14021 Fixes: https://github.com/nodejs/node/issues/14016 Reviewed-By: Refael Ackermann <refack@gmail.com>
Diffstat (limited to 'test/parallel/test-vm-sigint-existing-handler.js')
-rw-r--r--test/parallel/test-vm-sigint-existing-handler.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/test/parallel/test-vm-sigint-existing-handler.js b/test/parallel/test-vm-sigint-existing-handler.js
index cbd91bef06..eb67820ff2 100644
--- a/test/parallel/test-vm-sigint-existing-handler.js
+++ b/test/parallel/test-vm-sigint-existing-handler.js
@@ -1,8 +1,12 @@
'use strict';
const common = require('../common');
+if (common.isWindows) {
+ // No way to send CTRL_C_EVENT to processes from JS right now.
+ common.skip('platform not supported');
+}
+
const assert = require('assert');
const vm = require('vm');
-
const spawn = require('child_process').spawn;
const methods = [
@@ -10,12 +14,6 @@ const methods = [
'runInContext'
];
-if (common.isWindows) {
- // No way to send CTRL_C_EVENT to processes from JS right now.
- common.skip('platform not supported');
- return;
-}
-
if (process.argv[2] === 'child') {
const method = process.argv[3];
assert.ok(method);