This repository was archived by the owner on Apr 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
packages/schematics/angular/migrations/update-6 Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ function migrateKarmaConfiguration(config: CliConfig): Rule {
7878 content = content . replace ( `{ pattern: './src/test.ts', watched: false }` , '' ) ;
7979 content = content . replace ( `'./src/test.ts': ['@angular/cli'],` , '' ) ;
8080 content = content . replace ( `'./src/test.ts': ['@angular/cli']` , '' ) ;
81+ content = content . replace ( / a n g u l a r C l i [ ^ } ] * } , ? / , '' ) ;
8182 // Replace 1.x plugin names.
8283 content = content . replace ( / @ a n g u l a r \/ c l i / g, '@angular-devkit/build-angular' ) ;
8384 // Replace code coverage output path.
Original file line number Diff line number Diff line change @@ -682,13 +682,17 @@ describe('Migration to v6', () => {
682682 preprocessors: {
683683 './src/test.ts': ['@angular/cli']
684684 },
685+ angularCli: {
686+ environment: 'dev'
687+ },
685688 ` ) ;
686689
687690 tree . create ( oldConfigPath , JSON . stringify ( baseConfig , null , 2 ) ) ;
688691 tree = schematicRunner . runSchematic ( 'migration-01' , defaultOptions , tree ) ;
689692 const content = tree . readContent ( karmaPath ) ;
690693 expect ( content ) . not . toContain ( `{ pattern: './src/test.ts', watched: false }` ) ;
691694 expect ( content ) . not . toContain ( `'./src/test.ts': ['@angular/cli']` ) ;
695+ expect ( content ) . not . toMatch ( / a n g u l a r C l i [ ^ } ] * } , ? / ) ;
692696 } ) ;
693697 } ) ;
694698
You can’t perform that action at this time.
0 commit comments