@@ -201,14 +201,14 @@ describe(`Update to ${version}`, () => {
201
201
` . replace ( lineBreaksAndSpaceRegex , '' ) ) ;
202
202
} ) ;
203
203
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 ( ) => {
205
205
appTree . create ( '/testSrc/appPrefix/component/app.module.ts' , `
206
206
import { NgModule } from "@angular/core";
207
207
import { FormsModule } from "@angular/forms";
208
208
import { BrowserModule } from "@angular/platform-browser";
209
209
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
210
210
import { AppComponent } from "./app.component";
211
- import { IgxExcelExporterService, OtherService } from "igniteui-angular";
211
+ import { IgxCsvExporterService, IgxExcelExporterService } from "igniteui-angular";
212
212
import { ExcelExportComponent } from "./services/export-excel/excel-export.component";
213
213
214
214
@NgModule({
@@ -222,7 +222,10 @@ imports: [
222
222
BrowserAnimationsModule,
223
223
FormsModule
224
224
],
225
- providers: [IgxExcelExporterService , OtherService],
225
+ providers: [
226
+ IgxCsvExporterService,
227
+ IgxExcelExporterService
228
+ ],
226
229
entryComponents: [],
227
230
schemas: []
228
231
})
@@ -235,14 +238,14 @@ export class AppModule {}
235
238
236
239
expect (
237
240
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.
239
243
import { NgModule } from "@angular/core";
240
244
import { FormsModule } from "@angular/forms";
241
245
import { BrowserModule } from "@angular/platform-browser";
242
246
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
243
247
import { 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";
246
249
import { ExcelExportComponent } from "./services/export-excel/excel-export.component";
247
250
248
251
@NgModule({
@@ -256,8 +259,10 @@ imports: [
256
259
BrowserAnimationsModule,
257
260
FormsModule
258
261
],
259
- // IgxExcelExporterService has been removed. Exporter services can now be used without providing.
260
- providers: [/*IgxExcelExporterService,*/ OtherService],
262
+ providers: [
263
+ IgxCsvExporterService,
264
+ IgxExcelExporterService
265
+ ],
261
266
entryComponents: [],
262
267
schemas: []
263
268
})
0 commit comments