File tree 2 files changed +23
-1
lines changed
tests/legacy-cli/e2e/tests/misc
2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 3
3
4
4
// Provide a title to the process in `ps`.
5
5
// Due to an obscure Mac bug, do not start this title with any symbol.
6
- process . title = 'ng' ;
6
+ try {
7
+ process . title = 'ng ' + Array . from ( process . argv ) . slice ( 2 ) . join ( ' ' ) ;
8
+ } catch ( _ ) {
9
+ // If an error happened above, use the most basic title.
10
+ process . title = 'ng' ;
11
+ }
7
12
13
+ // Some older versions of Node do not support let or const.
8
14
var version = process . version . substr ( 1 ) . split ( '.' ) ;
9
15
if ( Number ( version [ 0 ] ) < 8 || ( Number ( version [ 0 ] ) === 8 && Number ( version [ 1 ] ) < 9 ) ) {
10
16
process . stderr . write (
Original file line number Diff line number Diff line change
1
+ import { exec , execAndWaitForOutputToMatch , killAllProcesses } from '../../utils/process' ;
2
+
3
+
4
+ export default async function ( ) {
5
+ try {
6
+ await execAndWaitForOutputToMatch ( 'ng' , [ 'build' , '--watch' ] , / ./ ) ;
7
+
8
+ const output = await exec ( 'ps' ) ;
9
+
10
+ if ( ! output . stdout . match ( / n g b u i l d - - w a t c h / ) ) {
11
+ throw new Error ( 'Title of the process was not properly set.' ) ;
12
+ }
13
+ } finally {
14
+ await killAllProcesses ( ) ;
15
+ }
16
+ }
You can’t perform that action at this time.
0 commit comments