@@ -1090,70 +1090,6 @@ describe('the nyc cli', function () {
10901090 done ( )
10911091 } )
10921092 } )
1093-
1094- it ( 'doesn’t create the temp directory for process info files when not present' , function ( done ) {
1095- var args = [ bin , process . execPath , 'selfspawn-fibonacci.js' , '5' ]
1096-
1097- var proc = spawn ( process . execPath , args , {
1098- cwd : fixturesCLI ,
1099- env : env
1100- } )
1101-
1102- proc . on ( 'exit' , function ( code ) {
1103- code . should . equal ( 0 )
1104- fs . stat ( path . resolve ( fixturesCLI , '.nyc_output' , 'processinfo' ) , function ( err , stat ) {
1105- err . code . should . equal ( 'ENOENT' )
1106- done ( )
1107- } )
1108- } )
1109- } )
1110- } )
1111-
1112- describe ( '--build-process-tree' , function ( ) {
1113- it ( 'builds, but does not display, a tree of spawned processes' , function ( done ) {
1114- var args = [ bin , '--build-process-tree' , process . execPath , 'selfspawn-fibonacci.js' , '5' ]
1115-
1116- var proc = spawn ( process . execPath , args , {
1117- cwd : fixturesCLI ,
1118- env : env
1119- } )
1120-
1121- var stdout = ''
1122- proc . stdout . setEncoding ( 'utf8' )
1123- proc . stdout . on ( 'data' , function ( chunk ) {
1124- stdout += chunk
1125- } )
1126-
1127- proc . on ( 'close' , function ( code ) {
1128- code . should . equal ( 0 )
1129- stdout . should . not . match ( new RegExp ( '└─' ) )
1130- const dir = path . resolve ( fixturesCLI , '.nyc_output' , 'processinfo' )
1131- fs . statSync ( dir )
1132- // make sure that the processinfo file has a numeric pid and ppid
1133- const files = fs . readdirSync ( dir ) . filter ( f => f !== 'index.json' )
1134- const data = JSON . parse ( fs . readFileSync ( dir + '/' + files [ 0 ] , 'utf8' ) )
1135- data . pid . should . be . a ( 'number' )
1136- data . ppid . should . be . a ( 'number' )
1137- done ( )
1138- } )
1139- } )
1140-
1141- it ( 'doesn’t create the temp directory for process info files when not present' , function ( done ) {
1142- var args = [ bin , process . execPath , 'selfspawn-fibonacci.js' , '5' ]
1143-
1144- var proc = spawn ( process . execPath , args , {
1145- cwd : fixturesCLI ,
1146- env : env
1147- } )
1148-
1149- proc . on ( 'exit' , function ( code ) {
1150- code . should . equal ( 0 )
1151- fs . stat ( path . resolve ( fixturesCLI , '.nyc_output' , 'processinfo' ) , function ( err , stat ) {
1152- err . code . should . equal ( 'ENOENT' )
1153- done ( )
1154- } )
1155- } )
1156- } )
11571093 } )
11581094
11591095 describe ( '--temp-dir' , function ( ) {
@@ -1174,7 +1110,7 @@ describe('the nyc cli', function () {
11741110 proc . on ( 'close' , function ( code ) {
11751111 code . should . equal ( 0 )
11761112 var tempFiles = fs . readdirSync ( path . resolve ( fixturesCLI , '.nyc_output' ) )
1177- tempFiles . length . should . equal ( 1 )
1113+ tempFiles . length . should . equal ( 2 ) // the coverage file, and processinfo
11781114 var cliFiles = fs . readdirSync ( path . resolve ( fixturesCLI ) )
11791115 cliFiles . should . include ( '.nyc_output' )
11801116 cliFiles . should . not . include ( '.temp_dir' )
@@ -1194,7 +1130,7 @@ describe('the nyc cli', function () {
11941130 proc . on ( 'exit' , function ( code ) {
11951131 code . should . equal ( 0 )
11961132 var tempFiles = fs . readdirSync ( path . resolve ( fixturesCLI , '.temp_directory' ) )
1197- tempFiles . length . should . equal ( 1 )
1133+ tempFiles . length . should . equal ( 2 )
11981134 var cliFiles = fs . readdirSync ( path . resolve ( fixturesCLI ) )
11991135 cliFiles . should . not . include ( '.nyc_output' )
12001136 cliFiles . should . not . include ( '.temp_dir' )
@@ -1214,7 +1150,7 @@ describe('the nyc cli', function () {
12141150 proc . on ( 'exit' , function ( code ) {
12151151 code . should . equal ( 0 )
12161152 var tempFiles = fs . readdirSync ( path . resolve ( fixturesCLI , '.temp_dir' ) )
1217- tempFiles . length . should . equal ( 1 )
1153+ tempFiles . length . should . equal ( 2 )
12181154 var cliFiles = fs . readdirSync ( path . resolve ( fixturesCLI ) )
12191155 cliFiles . should . not . include ( '.nyc_output' )
12201156 cliFiles . should . include ( '.temp_dir' )
0 commit comments