@@ -201,14 +201,14 @@ describe(`Update to ${version}`, () => {
201201` . replace ( lineBreaksAndSpaceRegex , '' ) ) ;
202202 } ) ;
203203
204- it ( 'should remove exporter services from module.ts files' , async ( ) => {
204+ it ( 'should insert a comment when exporter services are present in module.ts files' , async ( ) => {
205205 appTree . create ( '/testSrc/appPrefix/component/app.module.ts' , `
206206import { NgModule } from "@angular/core";
207207import { FormsModule } from "@angular/forms";
208208import { BrowserModule } from "@angular/platform-browser";
209209import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
210210import { AppComponent } from "./app.component";
211- import { IgxExcelExporterService, OtherService } from "igniteui-angular";
211+ import { IgxCsvExporterService, IgxExcelExporterService } from "igniteui-angular";
212212import { ExcelExportComponent } from "./services/export-excel/excel-export.component";
213213
214214@NgModule({
@@ -222,7 +222,10 @@ imports: [
222222 BrowserAnimationsModule,
223223 FormsModule
224224],
225- providers: [IgxExcelExporterService , OtherService],
225+ providers: [
226+ IgxCsvExporterService,
227+ IgxExcelExporterService
228+ ],
226229entryComponents: [],
227230schemas: []
228231})
@@ -235,14 +238,14 @@ export class AppModule {}
235238
236239 expect (
237240 tree . readContent ( '/testSrc/appPrefix/component/app.module.ts' )
238- ) . toEqual ( `
241+ ) . toEqual (
242+ `// IgxCsvExporterService and IgxExcelExporterService no longer need to be manually provided and can be safely removed.
239243import { NgModule } from "@angular/core";
240244import { FormsModule } from "@angular/forms";
241245import { BrowserModule } from "@angular/platform-browser";
242246import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
243247import { AppComponent } from "./app.component";
244- // IgxExcelExporterService has been removed. Exporter services can now be used without providing.
245- import { /*IgxExcelExporterService,*/ OtherService } from "igniteui-angular";
248+ import { IgxCsvExporterService, IgxExcelExporterService } from "igniteui-angular";
246249import { ExcelExportComponent } from "./services/export-excel/excel-export.component";
247250
248251@NgModule({
@@ -256,8 +259,10 @@ imports: [
256259 BrowserAnimationsModule,
257260 FormsModule
258261],
259- // IgxExcelExporterService has been removed. Exporter services can now be used without providing.
260- providers: [/*IgxExcelExporterService,*/ OtherService],
262+ providers: [
263+ IgxCsvExporterService,
264+ IgxExcelExporterService
265+ ],
261266entryComponents: [],
262267schemas: []
263268})
0 commit comments