Created
February 27, 2013 01:34
-
-
Save isaacs/5044137 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 937662b03e55b639792d7b635f80fb82db5a6044 Mon Sep 17 00:00:00 2001 | |
From: isaacs <i@izs.me> | |
Date: Tue, 26 Feb 2013 17:33:30 -0800 | |
Subject: [PATCH] test: Use common.PORT to determine debugger port | |
--- | |
test/simple/test-debugger-client.js | 5 ++++- | |
1 files changed, 4 insertions(+), 1 deletions(-) | |
diff --git a/test/simple/test-debugger-client.js b/test/simple/test-debugger-client.js | |
index 665fe93..8b4ba2c 100644 | |
--- a/test/simple/test-debugger-client.js | |
+++ b/test/simple/test-debugger-client.js | |
@@ -27,6 +27,8 @@ var common = require('../common'); | |
var assert = require('assert'); | |
var debug = require('_debugger'); | |
+var debugPort = common.PORT + 1337; | |
+debug.port = debugPort; | |
var spawn = require('child_process').spawn; | |
setTimeout(function() { | |
@@ -155,7 +157,8 @@ var script = 'setTimeout(function () { console.log("blah"); });' + | |
var nodeProcess; | |
function doTest(cb, done) { | |
- nodeProcess = spawn(process.execPath, ['-e', script]); | |
+ var args = ['--debug=' + debugPort, '-e', script]; | |
+ nodeProcess = spawn(process.execPath, args); | |
nodeProcess.stdout.once('data', function(c) { | |
console.log('>>> new node process: %d', nodeProcess.pid); | |
-- | |
1.7.5.4 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment