33var helpers = require ( '../helpers' ) ;
44var invokeMocha = helpers . invokeMocha ;
55var DEFAULT_FIXTURE = helpers . DEFAULT_FIXTURE ;
6- var platform = require ( 'os' ) . platform ( ) ;
76
87describe ( '--debug' , function ( ) {
9- before ( function ( ) {
10- if ( platform === 'win32' ) {
11- this . skip ( ) ;
12- }
13- } ) ;
14-
158 describe ( 'Node.js v8+' , function ( ) {
169 before ( function ( ) {
1710 if ( process . version . substring ( 0 , 2 ) === 'v6' ) {
@@ -54,8 +47,8 @@ describe('--debug', function() {
5447
5548 // debugger must be manually killed
5649 setTimeout ( function ( ) {
57- proc . kill ( 'SIGINT' ) ;
58- } , 1000 ) ;
50+ process . kill ( proc . pid , 'SIGINT' ) ;
51+ } , 2000 ) ;
5952 } ) ;
6053
6154 it ( 'should respect custom host/port' , function ( done ) {
@@ -108,19 +101,16 @@ describe('--debug', function() {
108101 if ( err ) {
109102 return done ( err ) ;
110103 }
111- expect ( res , 'to have passed' ) . and (
112- 'to contain output' ,
113- / D e b u g g e r l i s t e n i n g / i
114- ) ;
104+ expect ( res , 'to contain output' , / D e b u g g e r l i s t e n i n g / i) ;
115105 done ( ) ;
116106 } ,
117107 'pipe'
118108 ) ;
119109
120110 // debugger must be manually killed
121111 setTimeout ( function ( ) {
122- proc . kill ( 'SIGINT' ) ;
123- } , 1000 ) ;
112+ process . kill ( proc . pid , 'SIGINT' ) ;
113+ } , 2000 ) ;
124114 } ) ;
125115
126116 it ( 'should respect custom host/port' , function ( done ) {
@@ -130,7 +120,8 @@ describe('--debug', function() {
130120 if ( err ) {
131121 return done ( err ) ;
132122 }
133- expect ( res , 'to have passed' ) . and (
123+ expect (
124+ res ,
134125 'to contain output' ,
135126 / D e b u g g e r l i s t e n i n g o n .* 1 2 7 .0 .0 .1 : 9 2 2 9 / i
136127 ) ;
@@ -140,8 +131,8 @@ describe('--debug', function() {
140131 ) ;
141132
142133 setTimeout ( function ( ) {
143- proc . kill ( 'SIGINT' ) ;
144- } , 1000 ) ;
134+ process . kill ( proc . pid , 'SIGINT' ) ;
135+ } , 2000 ) ;
145136 } ) ;
146137 } ) ;
147138} ) ;
0 commit comments