@@ -1090,70 +1090,6 @@ describe('the nyc cli', function () {
1090
1090
done ( )
1091
1091
} )
1092
1092
} )
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
- } )
1157
1093
} )
1158
1094
1159
1095
describe ( '--temp-dir' , function ( ) {
@@ -1174,7 +1110,7 @@ describe('the nyc cli', function () {
1174
1110
proc . on ( 'close' , function ( code ) {
1175
1111
code . should . equal ( 0 )
1176
1112
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
1178
1114
var cliFiles = fs . readdirSync ( path . resolve ( fixturesCLI ) )
1179
1115
cliFiles . should . include ( '.nyc_output' )
1180
1116
cliFiles . should . not . include ( '.temp_dir' )
@@ -1194,7 +1130,7 @@ describe('the nyc cli', function () {
1194
1130
proc . on ( 'exit' , function ( code ) {
1195
1131
code . should . equal ( 0 )
1196
1132
var tempFiles = fs . readdirSync ( path . resolve ( fixturesCLI , '.temp_directory' ) )
1197
- tempFiles . length . should . equal ( 1 )
1133
+ tempFiles . length . should . equal ( 2 )
1198
1134
var cliFiles = fs . readdirSync ( path . resolve ( fixturesCLI ) )
1199
1135
cliFiles . should . not . include ( '.nyc_output' )
1200
1136
cliFiles . should . not . include ( '.temp_dir' )
@@ -1214,7 +1150,7 @@ describe('the nyc cli', function () {
1214
1150
proc . on ( 'exit' , function ( code ) {
1215
1151
code . should . equal ( 0 )
1216
1152
var tempFiles = fs . readdirSync ( path . resolve ( fixturesCLI , '.temp_dir' ) )
1217
- tempFiles . length . should . equal ( 1 )
1153
+ tempFiles . length . should . equal ( 2 )
1218
1154
var cliFiles = fs . readdirSync ( path . resolve ( fixturesCLI ) )
1219
1155
cliFiles . should . not . include ( '.nyc_output' )
1220
1156
cliFiles . should . include ( '.temp_dir' )
0 commit comments