11import { moveFile } from '../../utils/fs' ;
2- import { installPackage , uninstallPackage } from '../../utils/packages' ;
2+ import { getActivePackageManager , installPackage , uninstallPackage } from '../../utils/packages' ;
33import { execAndWaitForOutputToMatch , ng } from '../../utils/process' ;
44import { expectToFail } from '../../utils/utils' ;
55
@@ -14,7 +14,13 @@ export default async function () {
1414 / C o u l d n o t f i n d t h e ' @ a n g u l a r - d e v k i t \/ b u i l d - a n g u l a r : b r o w s e r ' b u i l d e r ' s n o d e p a c k a g e \. / ,
1515 ) ;
1616 await expectToFail ( ( ) =>
17- execAndWaitForOutputToMatch ( 'ng' , [ 'build' ] , / N o d e p a c k a g e s m a y n o t b e i n s t a l l e d \. / ) ,
17+ execAndWaitForOutputToMatch (
18+ 'ng' ,
19+ [ 'build' ] ,
20+ new RegExp (
21+ `Node packages may not be installed\. Try installing with '${ getActivePackageManager ( ) } install'\.` ,
22+ ) ,
23+ ) ,
1824 ) ;
1925
2026 await moveFile ( 'node_modules' , 'temp_node_modules' ) ;
@@ -25,7 +31,13 @@ export default async function () {
2531 [ 'build' ] ,
2632 / C o u l d n o t f i n d t h e ' @ a n g u l a r - d e v k i t \/ b u i l d - a n g u l a r : b r o w s e r ' b u i l d e r ' s n o d e p a c k a g e \. / ,
2733 ) ;
28- await execAndWaitForOutputToMatch ( 'ng' , [ 'build' ] , / N o d e p a c k a g e s m a y n o t b e i n s t a l l e d \. / ) ;
34+ await execAndWaitForOutputToMatch (
35+ 'ng' ,
36+ [ 'build' ] ,
37+ new RegExp (
38+ `Node packages may not be installed\. Try installing with '${ getActivePackageManager ( ) } install'\.` ,
39+ ) ,
40+ ) ;
2941 } finally {
3042 await moveFile ( 'temp_node_modules' , 'node_modules' ) ;
3143 await installPackage ( '@angular-devkit/build-angular' ) ;
0 commit comments