@@ -3,28 +3,28 @@ const path = require('path');
3
3
const { spawn } = require ( 'child-process-promise' ) ;
4
4
5
5
( async ( ) => {
6
- const myPath = argv . _ [ 0 ] || '.' ; // default to the current directory
7
- const dir = path . resolve ( myPath ) ;
8
- const { name } = require ( `${ dir } /package.json` ) ;
6
+ const myPath = argv . _ [ 0 ] || '.' ; // default to the current directory
7
+ const dir = path . resolve ( myPath ) ;
8
+ const { name } = require ( `${ dir } /package.json` ) ;
9
9
10
- let stdio = '' ;
11
- let stderr = '' ;
12
- try {
13
- const testProcess = spawn ( 'yarn' , [ '--cwd' , dir , 'test' ] ) ;
10
+ let stdio = '' ;
11
+ let stderr = '' ;
12
+ try {
13
+ const testProcess = spawn ( 'yarn' , [ '--cwd' , dir , 'test' ] ) ;
14
14
15
- testProcess . childProcess . stdout . on ( 'data' , data => {
16
- stdio += data . toString ( ) ;
17
- } ) ;
18
- testProcess . childProcess . stderr . on ( 'data' , data => {
19
- stderr += data . toString ( ) ;
20
- } ) ;
15
+ testProcess . childProcess . stdout . on ( 'data' , data => {
16
+ stdio += data . toString ( ) ;
17
+ } ) ;
18
+ testProcess . childProcess . stderr . on ( 'data' , data => {
19
+ stderr += data . toString ( ) ;
20
+ } ) ;
21
21
22
- await testProcess ;
23
- console . log ( 'Success: ' + name ) ;
24
- } catch ( e ) {
25
- console . error ( 'Failure: ' + name ) ;
26
- console . log ( stdio ) ;
27
- console . error ( stderr ) ;
28
- process . exit ( 1 ) ;
29
- }
22
+ await testProcess ;
23
+ console . log ( 'Success: ' + name ) ;
24
+ } catch ( e ) {
25
+ console . error ( 'Failure: ' + name ) ;
26
+ console . log ( stdio ) ;
27
+ console . error ( stderr ) ;
28
+ process . exit ( 1 ) ;
29
+ }
30
30
} ) ( ) ;
0 commit comments