@@ -100,8 +100,9 @@ module.exports = {
100
100
fs : fsMock
101
101
} ) ;
102
102
var unhookIntercept = intercept ( function onIntercept ( txt ) {
103
- stdout . push ( txt . replace ( / \u001b \[ .* ?m / g, '' ) ) ;
104
- // return '';
103
+ if ( typeof txt === 'string' ) {
104
+ stdout . push ( txt . replace ( / \u001b \[ .* ?m / g, '' ) ) ;
105
+ }
105
106
} ) ;
106
107
app . init ( {
107
108
chdir : appdir + '/'
@@ -151,8 +152,9 @@ module.exports = {
151
152
shelljs : shelljsMock
152
153
} ) ;
153
154
var unhookIntercept = intercept ( function onIntercept ( txt ) {
154
- stdout . push ( txt . replace ( / \u001b \[ .* ?m / g, '' ) ) ;
155
- // return '';
155
+ if ( typeof txt === 'string' ) {
156
+ stdout . push ( txt . replace ( / \u001b \[ .* ?m / g, '' ) ) ;
157
+ }
156
158
} ) ;
157
159
app . init ( {
158
160
chdir : appdir + '/'
@@ -191,8 +193,9 @@ module.exports = {
191
193
tmp : tmpMock
192
194
} ) ;
193
195
var unhookIntercept = intercept ( function onIntercept ( txt ) {
194
- stdout . push ( txt . replace ( / \u001b \[ .* ?m / g, '' ) ) ;
195
- // return '';
196
+ if ( typeof txt === 'string' ) {
197
+ stdout . push ( txt . replace ( / \u001b \[ .* ?m / g, '' ) ) ;
198
+ }
196
199
} ) ;
197
200
app . init ( {
198
201
chdir : appdir + '/'
@@ -233,8 +236,9 @@ module.exports = {
233
236
shelljs : shelljsMock
234
237
} ) ;
235
238
var unhookIntercept = intercept ( function onIntercept ( txt ) {
236
- stdout . push ( txt . replace ( / \u001b \[ .* ?m / g, '' ) ) ;
237
- // return '';
239
+ if ( typeof txt === 'string' ) {
240
+ stdout . push ( txt . replace ( / \u001b \[ .* ?m / g, '' ) ) ;
241
+ }
238
242
} ) ;
239
243
app . init ( {
240
244
chdir : appdir + '/'
@@ -266,8 +270,9 @@ module.exports = {
266
270
bddStdin ( '\n' , 'y\n' , 'n\n' ) ;
267
271
process . argv = [ 'node' , appdir + '/artisan' , 'laravel:config' ] ;
268
272
var unhookIntercept = intercept ( function onIntercept ( txt ) {
269
- stdout . push ( txt . replace ( / \u001b \[ .* ?m / g, '' ) ) ;
270
- // return '';
273
+ if ( typeof txt === 'string' ) {
274
+ stdout . push ( txt . replace ( / \u001b \[ .* ?m / g, '' ) ) ;
275
+ }
271
276
} ) ;
272
277
app . init ( {
273
278
chdir : appdir + '/'
@@ -318,8 +323,9 @@ module.exports = {
318
323
bddStdin ( '\n' , 'y\n' , 'n\n' ) ;
319
324
process . argv = [ 'node' , appdir + '/artisan' , 'laravel:config' ] ;
320
325
var unhookIntercept = intercept ( function onIntercept ( txt ) {
321
- stdout . push ( txt . replace ( / \u001b \[ .* ?m / g, '' ) ) ;
322
- // return '';
326
+ if ( typeof txt === 'string' ) {
327
+ stdout . push ( txt . replace ( / \u001b \[ .* ?m / g, '' ) ) ;
328
+ }
323
329
} ) ;
324
330
app . init ( {
325
331
chdir : appdir + '/'
0 commit comments