File tree 1 file changed +3
-10
lines changed
test/fixtures/__shared__/util
1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -4,28 +4,21 @@ const os = require('os');
4
4
const stripAnsi = require ( 'strip-ansi' ) ;
5
5
const waitForLocalhost = require ( 'wait-for-localhost' ) ;
6
6
7
- function stripNoise ( output ) {
8
- let lines = output . split ( '\n' ) ;
9
- return lines . join ( '\n' ) ;
10
- }
11
-
12
7
function execaSafe ( ...args ) {
13
8
return execa ( ...args )
14
9
. then ( ( { stdout, stderr, ...rest } ) => ( {
15
10
fulfilled : true ,
16
11
rejected : false ,
17
- stdout : stripNoise ( stripAnsi ( stdout ) ) ,
18
- stderr : stripNoise ( stripAnsi ( stderr ) ) ,
12
+ stdout : stripAnsi ( stdout ) ,
13
+ stderr : stripAnsi ( stderr ) ,
19
14
...rest ,
20
15
} ) )
21
16
. catch ( err => ( {
22
17
fulfilled : false ,
23
18
rejected : true ,
24
19
reason : err ,
25
20
stdout : '' ,
26
- stderr : stripNoise (
27
- stripAnsi ( err . message . split ( '\n' ) . slice ( 2 ) . join ( '\n' ) )
28
- ) ,
21
+ stderr : stripAnsi ( err . message . split ( '\n' ) . slice ( 2 ) . join ( '\n' ) ) ,
29
22
} ) ) ;
30
23
}
31
24
You can’t perform that action at this time.
0 commit comments