@@ -195,7 +195,7 @@ describe('route utils', () => {
195
195
} ) ;
196
196
it ( 'inserts into the correct array' , ( ) => {
197
197
let editedFile = new InsertChange ( mainFile , 124 , ', [ HTTP_PROVIDERS, {provide: [BAR]}]' ) ;
198
- return editedFile . apply ( NodeHostNodeHostNodeHostNodeHostNodeHost )
198
+ return editedFile . apply ( NodeHost )
199
199
. then ( ( ) => nru . applyChanges ( nru . bootstrapItem ( mainFile , routes , toBootstrap ) ) )
200
200
. then ( ( ) => readFile ( mainFile , 'utf8' ) )
201
201
. then ( content => {
@@ -205,7 +205,7 @@ describe('route utils', () => {
205
205
} ) ;
206
206
it ( 'throws an error if there is no or multiple bootstrap expressions' , ( ) => {
207
207
let editedFile = new InsertChange ( mainFile , 126 , '\n bootstrap(moreStuff);' ) ;
208
- return editedFile . apply ( NodeHostNodeHostNodeHostNodeHostNodeHost )
208
+ return editedFile . apply ( NodeHost )
209
209
. then ( ( ) => nru . bootstrapItem ( mainFile , routes , toBootstrap ) )
210
210
. catch ( e =>
211
211
expect ( e . message ) . toEqual ( 'Did not bootstrap provideRouter in' +
@@ -214,7 +214,7 @@ describe('route utils', () => {
214
214
} ) ;
215
215
it ( 'configures correctly if bootstrap or provide router is not at top level' , ( ) => {
216
216
let editedFile = new InsertChange ( mainFile , 126 , '\n if(e){bootstrap, provideRouter});' ) ;
217
- return editedFile . apply ( NodeHostNodeHostNodeHostNodeHostNodeHost )
217
+ return editedFile . apply ( NodeHost )
218
218
. then ( ( ) => nru . applyChanges ( nru . bootstrapItem ( mainFile , routes , toBootstrap ) ) )
219
219
. then ( ( ) => readFile ( mainFile , 'utf8' ) )
220
220
. then ( content => {
@@ -299,7 +299,7 @@ export default [\n { path: 'new-route', component: NewRouteComponent }\n];`);
299
299
} ) ;
300
300
it ( 'inserts under parent, mid' , ( ) => {
301
301
let editedFile = new InsertChange ( routesFile , 16 , nestedRoutes ) ;
302
- return editedFile . apply ( NodeHostNodeHost ) . then ( ( ) => {
302
+ return editedFile . apply ( NodeHost ) . then ( ( ) => {
303
303
options . dasherizedName = 'details' ;
304
304
options . component = 'DetailsComponent' ;
305
305
return nru . applyChanges (
@@ -324,7 +324,7 @@ export default [
324
324
} ) ;
325
325
it ( 'inserts under parent, deep' , ( ) => {
326
326
let editedFile = new InsertChange ( routesFile , 16 , nestedRoutes ) ;
327
- return editedFile . apply ( NodeHostNodeHost ) . then ( ( ) => {
327
+ return editedFile . apply ( NodeHost ) . then ( ( ) => {
328
328
options . dasherizedName = 'sections' ;
329
329
options . component = 'SectionsComponent' ;
330
330
return nru . applyChanges (
@@ -360,7 +360,7 @@ export default [
360
360
]
361
361
}\n` ;
362
362
let editedFile = new InsertChange ( routesFile , 16 , paths ) ;
363
- return editedFile . apply ( NodeHostNodeHost ) . then ( ( ) => {
363
+ return editedFile . apply ( NodeHost ) . then ( ( ) => {
364
364
options . dasherizedName = 'about' ;
365
365
options . component = 'AboutComponent_1' ;
366
366
return nru . applyChanges (
@@ -383,7 +383,7 @@ export default [
383
383
} ) ;
384
384
it ( 'throws error if repeating child, shallow' , ( ) => {
385
385
let editedFile = new InsertChange ( routesFile , 16 , nestedRoutes ) ;
386
- return editedFile . apply ( NodeHostNodeHost ) . then ( ( ) => {
386
+ return editedFile . apply ( NodeHost ) . then ( ( ) => {
387
387
options . dasherizedName = 'home' ;
388
388
options . component = 'HomeComponent' ;
389
389
return nru . addPathToRoutes ( routesFile , _ . merge ( { route : '/home' } , options ) ) ;
@@ -393,7 +393,7 @@ export default [
393
393
} ) ;
394
394
it ( 'throws error if repeating child, mid' , ( ) => {
395
395
let editedFile = new InsertChange ( routesFile , 16 , nestedRoutes ) ;
396
- return editedFile . apply ( NodeHostNodeHost ) . then ( ( ) => {
396
+ return editedFile . apply ( NodeHost ) . then ( ( ) => {
397
397
options . dasherizedName = 'about' ;
398
398
options . component = 'AboutComponent' ;
399
399
return nru . addPathToRoutes ( routesFile , _ . merge ( { route : 'home/about/' } , options ) ) ;
@@ -403,7 +403,7 @@ export default [
403
403
} ) ;
404
404
it ( 'throws error if repeating child, deep' , ( ) => {
405
405
let editedFile = new InsertChange ( routesFile , 16 , nestedRoutes ) ;
406
- return editedFile . apply ( NodeHostNodeHost ) . then ( ( ) => {
406
+ return editedFile . apply ( NodeHost ) . then ( ( ) => {
407
407
options . dasherizedName = 'more' ;
408
408
options . component = 'MoreComponent' ;
409
409
return nru . addPathToRoutes ( routesFile , _ . merge ( { route : 'home/about/more' } , options ) ) ;
@@ -413,7 +413,7 @@ export default [
413
413
} ) ;
414
414
it ( 'does not report false repeat' , ( ) => {
415
415
let editedFile = new InsertChange ( routesFile , 16 , nestedRoutes ) ;
416
- return editedFile . apply ( NodeHostNodeHost ) . then ( ( ) => {
416
+ return editedFile . apply ( NodeHost ) . then ( ( ) => {
417
417
options . dasherizedName = 'more' ;
418
418
options . component = 'MoreComponent' ;
419
419
return nru . applyChanges ( nru . addPathToRoutes ( routesFile , _ . merge ( { route : 'more' } , options ) ) ) ;
@@ -448,7 +448,7 @@ export default [
448
448
},\n { path: 'trap-queen', component: TrapQueenComponent}\n` ;
449
449
450
450
let editedFile = new InsertChange ( routesFile , 16 , routes ) ;
451
- return editedFile . apply ( NodeHostNodeHost ) . then ( ( ) => {
451
+ return editedFile . apply ( NodeHost ) . then ( ( ) => {
452
452
options . dasherizedName = 'trap-queen' ;
453
453
options . component = 'TrapQueenComponent' ;
454
454
return nru . applyChanges (
@@ -475,10 +475,10 @@ export default [
475
475
it ( 'resolves imports correctly' , ( ) => {
476
476
let editedFile = new InsertChange ( routesFile , 16 ,
477
477
`\n { path: 'home', component: HomeComponent }\n` ) ;
478
- return editedFile . apply ( NodeHostNodeHost ) . then ( ( ) => {
478
+ return editedFile . apply ( NodeHost ) . then ( ( ) => {
479
479
let editedFile = new InsertChange ( routesFile , 0 ,
480
480
`import { HomeComponent } from './app/home/home.component';\n` ) ;
481
- return editedFile . apply ( NodeHostNodeHost ) ;
481
+ return editedFile . apply ( NodeHost ) ;
482
482
} )
483
483
. then ( ( ) => {
484
484
options . dasherizedName = 'home' ;
@@ -507,7 +507,7 @@ export default [
507
507
{ path: 'details', component: DetailsComponent }
508
508
]
509
509
}` ) ;
510
- return editedFile . apply ( NodeHostNodeHost ) . then ( ( ) => {
510
+ return editedFile . apply ( NodeHost ) . then ( ( ) => {
511
511
let editedFile = new InsertChange ( routesFile , 0 ,
512
512
`import { AboutComponent } from './app/about/about.component';
513
513
import { DetailsComponent } from './app/about/details/details.component';
0 commit comments