@@ -22,33 +22,30 @@ var env = {
2222 TRACE_COLLECTOR_API_URL : 'http://127.0.0.1:' + TEST_WEB_SERVER_PORT
2323}
2424
25- test ( 'should report crash' , function ( t ) {
26- if ( semver . satisfies ( process . version , '>= 6' ) ) {
27- t . plan ( 2 )
28- var app = express ( )
29- app . use ( bodyParser . json ( ) )
30- app . post ( '/transaction-events' , function ( req , res ) {
31- var event = req . body . e . find ( function ( e ) {
32- return e . t === 'err' && e . d . t === 'system-error'
33- } )
34- t . ok ( event != null , 'Error event exists' )
35- t . end ( )
36- process . exit ( 0 )
25+ test ( 'should report crash' , {
26+ skip : ! semver . satisfies ( process . version , '>= 6' )
27+ } , function ( t ) {
28+ t . plan ( 2 )
29+ var app = express ( )
30+ app . use ( bodyParser . json ( ) )
31+ app . post ( '/transaction-events' , function ( req , res ) {
32+ var event = req . body . e . find ( function ( e ) {
33+ return e . t === 'err' && e . d . t === 'system-error'
3734 } )
38- app . listen ( TEST_WEB_SERVER_PORT , function ( err ) {
39- t . error ( err , 'server starts listening at ' + TEST_WEB_SERVER_PORT )
35+ t . ok ( event != null , 'Error event exists' )
36+ t . end ( )
37+ process . exit ( 0 )
38+ } )
39+ app . listen ( TEST_WEB_SERVER_PORT , function ( err ) {
40+ t . error ( err , 'server starts listening at ' + TEST_WEB_SERVER_PORT )
4041
41- spawnSync ( 'node' , [ path . join ( __dirname , 'testee.js' ) ] , {
42+ spawnSync ( 'node' , [ path . join ( __dirname , 'testee.js' ) ] , {
4243
43- env : defaultsDeep ( { } , env , process . env )
44- } )
45- setTimeout ( function ( ) {
46- t . fail ( 'test timed out without completing' )
47- process . exit ( 1 )
48- } , TEST_TIMEOUT )
44+ env : defaultsDeep ( { } , env , process . env )
4945 } )
50- } else {
51- t . pass ( 'Test does not apply for this version' )
52- t . end ( )
53- }
46+ setTimeout ( function ( ) {
47+ t . fail ( 'test timed out without completing' )
48+ process . exit ( 1 )
49+ } , TEST_TIMEOUT )
50+ } )
5451} )
0 commit comments