@@ -31,7 +31,6 @@ describe('Component Schematic', () => {
31
31
project : 'bar' ,
32
32
} ;
33
33
34
-
35
34
const workspaceOptions : WorkspaceOptions = {
36
35
name : 'workspace' ,
37
36
newProjectRoot : 'projects' ,
@@ -50,21 +49,23 @@ describe('Component Schematic', () => {
50
49
let appTree : UnitTestTree ;
51
50
beforeEach ( async ( ) => {
52
51
appTree = schematicRunner . runSchematic ( 'workspace' , workspaceOptions ) ;
53
- appTree = await schematicRunner . runSchematicAsync ( 'application' , appOptions , appTree )
52
+ appTree = await schematicRunner
53
+ . runSchematicAsync ( 'application' , appOptions , appTree )
54
54
. toPromise ( ) ;
55
55
} ) ;
56
56
57
57
it ( 'should create a component' , async ( ) => {
58
58
const options = { ...defaultOptions } ;
59
- const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree )
60
- . toPromise ( ) ;
59
+ const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree ) . toPromise ( ) ;
61
60
const files = tree . files ;
62
- expect ( files ) . toEqual ( jasmine . arrayContaining ( [
63
- '/projects/bar/src/app/foo/foo.component.css' ,
64
- '/projects/bar/src/app/foo/foo.component.html' ,
65
- '/projects/bar/src/app/foo/foo.component.spec.ts' ,
66
- '/projects/bar/src/app/foo/foo.component.ts' ,
67
- ] ) ) ;
61
+ expect ( files ) . toEqual (
62
+ jasmine . arrayContaining ( [
63
+ '/projects/bar/src/app/foo/foo.component.css' ,
64
+ '/projects/bar/src/app/foo/foo.component.html' ,
65
+ '/projects/bar/src/app/foo/foo.component.spec.ts' ,
66
+ '/projects/bar/src/app/foo/foo.component.ts' ,
67
+ ] ) ,
68
+ ) ;
68
69
const moduleContent = tree . readContent ( '/projects/bar/src/app/app.module.ts' ) ;
69
70
expect ( moduleContent ) . toMatch ( / i m p o r t .* F o o .* f r o m ' .\/ f o o \/ f o o .c o m p o n e n t ' / ) ;
70
71
expect ( moduleContent ) . toMatch ( / d e c l a r a t i o n s : \s * \[ [ ^ \] ] + ?, \r ? \n \s + F o o C o m p o n e n t \r ? \n / m) ;
@@ -73,95 +74,91 @@ describe('Component Schematic', () => {
73
74
it ( 'should set change detection to OnPush' , async ( ) => {
74
75
const options = { ...defaultOptions , changeDetection : 'OnPush' } ;
75
76
76
- const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree )
77
- . toPromise ( ) ;
77
+ const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree ) . toPromise ( ) ;
78
78
const tsContent = tree . readContent ( '/projects/bar/src/app/foo/foo.component.ts' ) ;
79
79
expect ( tsContent ) . toMatch ( / c h a n g e D e t e c t i o n : C h a n g e D e t e c t i o n S t r a t e g y .O n P u s h / ) ;
80
80
} ) ;
81
81
82
82
it ( 'should not set view encapsulation' , async ( ) => {
83
83
const options = { ...defaultOptions } ;
84
84
85
- const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree )
86
- . toPromise ( ) ;
85
+ const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree ) . toPromise ( ) ;
87
86
const tsContent = tree . readContent ( '/projects/bar/src/app/foo/foo.component.ts' ) ;
88
87
expect ( tsContent ) . not . toMatch ( / e n c a p s u l a t i o n : V i e w E n c a p s u l a t i o n / ) ;
89
88
} ) ;
90
89
91
90
it ( 'should set view encapsulation to Emulated' , async ( ) => {
92
91
const options = { ...defaultOptions , viewEncapsulation : 'Emulated' } ;
93
92
94
- const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree )
95
- . toPromise ( ) ;
93
+ const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree ) . toPromise ( ) ;
96
94
const tsContent = tree . readContent ( '/projects/bar/src/app/foo/foo.component.ts' ) ;
97
95
expect ( tsContent ) . toMatch ( / e n c a p s u l a t i o n : V i e w E n c a p s u l a t i o n .E m u l a t e d / ) ;
98
96
} ) ;
99
97
100
98
it ( 'should set view encapsulation to None' , async ( ) => {
101
99
const options = { ...defaultOptions , viewEncapsulation : 'None' } ;
102
100
103
- const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree )
104
- . toPromise ( ) ;
101
+ const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree ) . toPromise ( ) ;
105
102
const tsContent = tree . readContent ( '/projects/bar/src/app/foo/foo.component.ts' ) ;
106
103
expect ( tsContent ) . toMatch ( / e n c a p s u l a t i o n : V i e w E n c a p s u l a t i o n .N o n e / ) ;
107
104
} ) ;
108
105
109
106
it ( 'should create a flat component' , async ( ) => {
110
107
const options = { ...defaultOptions , flat : true } ;
111
108
112
- const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree )
113
- . toPromise ( ) ;
109
+ const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree ) . toPromise ( ) ;
114
110
const files = tree . files ;
115
- expect ( files ) . toEqual ( jasmine . arrayContaining ( [
116
- '/projects/bar/src/app/foo.component.css' ,
117
- '/projects/bar/src/app/foo.component.html' ,
118
- '/projects/bar/src/app/foo.component.spec.ts' ,
119
- '/projects/bar/src/app/foo.component.ts' ,
120
- ] ) ) ;
111
+ expect ( files ) . toEqual (
112
+ jasmine . arrayContaining ( [
113
+ '/projects/bar/src/app/foo.component.css' ,
114
+ '/projects/bar/src/app/foo.component.html' ,
115
+ '/projects/bar/src/app/foo.component.spec.ts' ,
116
+ '/projects/bar/src/app/foo.component.ts' ,
117
+ ] ) ,
118
+ ) ;
121
119
} ) ;
122
120
123
121
it ( 'should find the closest module' , async ( ) => {
124
122
const options = { ...defaultOptions } ;
125
123
const fooModule = '/projects/bar/src/app/foo/foo.module.ts' ;
126
- appTree . create ( fooModule , `
124
+ appTree . create (
125
+ fooModule ,
126
+ `
127
127
import { NgModule } from '@angular/core';
128
128
129
129
@NgModule({
130
130
imports: [],
131
131
declarations: []
132
132
})
133
133
export class FooModule { }
134
- ` ) ;
134
+ ` ,
135
+ ) ;
135
136
136
- const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree )
137
- . toPromise ( ) ;
137
+ const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree ) . toPromise ( ) ;
138
138
const fooModuleContent = tree . readContent ( fooModule ) ;
139
139
expect ( fooModuleContent ) . toMatch ( / i m p o r t { F o o C o m p o n e n t } f r o m ' .\/ f o o .c o m p o n e n t ' / ) ;
140
140
} ) ;
141
141
142
142
it ( 'should export the component' , async ( ) => {
143
143
const options = { ...defaultOptions , export : true } ;
144
144
145
- const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree )
146
- . toPromise ( ) ;
145
+ const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree ) . toPromise ( ) ;
147
146
const appModuleContent = tree . readContent ( '/projects/bar/src/app/app.module.ts' ) ;
148
147
expect ( appModuleContent ) . toMatch ( / e x p o r t s : \[ F o o C o m p o n e n t \] / ) ;
149
148
} ) ;
150
149
151
150
it ( 'should set the entry component' , async ( ) => {
152
151
const options = { ...defaultOptions , entryComponent : true } ;
153
152
154
- const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree )
155
- . toPromise ( ) ;
153
+ const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree ) . toPromise ( ) ;
156
154
const appModuleContent = tree . readContent ( '/projects/bar/src/app/app.module.ts' ) ;
157
155
expect ( appModuleContent ) . toMatch ( / e n t r y C o m p o n e n t s : \[ F o o C o m p o n e n t \] / ) ;
158
156
} ) ;
159
157
160
158
it ( 'should import into a specified module' , async ( ) => {
161
159
const options = { ...defaultOptions , module : 'app.module.ts' } ;
162
160
163
- const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree )
164
- . toPromise ( ) ;
161
+ const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree ) . toPromise ( ) ;
165
162
const appModule = tree . readContent ( '/projects/bar/src/app/app.module.ts' ) ;
166
163
167
164
expect ( appModule ) . toMatch ( / i m p o r t { F o o C o m p o n e n t } f r o m ' .\/ f o o \/ f o o .c o m p o n e n t ' / ) ;
@@ -182,76 +179,60 @@ describe('Component Schematic', () => {
182
179
const pathOption = 'projects/bar/src/app/SOME/UPPER/DIR' ;
183
180
const options = { ...defaultOptions , path : pathOption } ;
184
181
185
- const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree )
186
- . toPromise ( ) ;
182
+ const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree ) . toPromise ( ) ;
187
183
let files = tree . files ;
188
184
let root = `/${ pathOption } /foo/foo.component` ;
189
- expect ( files ) . toEqual ( jasmine . arrayContaining ( [
190
- `${ root } .css` ,
191
- `${ root } .html` ,
192
- `${ root } .spec.ts` ,
193
- `${ root } .ts` ,
194
- ] ) ) ;
185
+ expect ( files ) . toEqual (
186
+ jasmine . arrayContaining ( [ `${ root } .css` , `${ root } .html` , `${ root } .spec.ts` , `${ root } .ts` ] ) ,
187
+ ) ;
195
188
196
189
const options2 = { ...options , name : 'BAR' } ;
197
- const tree2 = await schematicRunner . runSchematicAsync ( 'component' , options2 , tree )
198
- . toPromise ( ) ;
190
+ const tree2 = await schematicRunner . runSchematicAsync ( 'component' , options2 , tree ) . toPromise ( ) ;
199
191
files = tree2 . files ;
200
192
root = `/${ pathOption } /bar/bar.component` ;
201
- expect ( files ) . toEqual ( jasmine . arrayContaining ( [
202
- `${ root } .css` ,
203
- `${ root } .html` ,
204
- `${ root } .spec.ts` ,
205
- `${ root } .ts` ,
206
- ] ) ) ;
193
+ expect ( files ) . toEqual (
194
+ jasmine . arrayContaining ( [ `${ root } .css` , `${ root } .html` , `${ root } .spec.ts` , `${ root } .ts` ] ) ,
195
+ ) ;
207
196
} ) ;
208
197
209
198
it ( 'should create a component in a sub-directory' , async ( ) => {
210
199
const options = { ...defaultOptions , path : 'projects/bar/src/app/a/b/c' } ;
211
200
212
- const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree )
213
- . toPromise ( ) ;
201
+ const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree ) . toPromise ( ) ;
214
202
const files = tree . files ;
215
203
const root = `/${ options . path } /foo/foo.component` ;
216
- expect ( files ) . toEqual ( jasmine . arrayContaining ( [
217
- `${ root } .css` ,
218
- `${ root } .html` ,
219
- `${ root } .spec.ts` ,
220
- `${ root } .ts` ,
221
- ] ) ) ;
204
+ expect ( files ) . toEqual (
205
+ jasmine . arrayContaining ( [ `${ root } .css` , `${ root } .html` , `${ root } .spec.ts` , `${ root } .ts` ] ) ,
206
+ ) ;
222
207
} ) ;
223
208
224
209
it ( 'should use the prefix' , async ( ) => {
225
210
const options = { ...defaultOptions , prefix : 'pre' } ;
226
211
227
- const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree )
228
- . toPromise ( ) ;
212
+ const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree ) . toPromise ( ) ;
229
213
const content = tree . readContent ( '/projects/bar/src/app/foo/foo.component.ts' ) ;
230
214
expect ( content ) . toMatch ( / s e l e c t o r : ' p r e - f o o ' / ) ;
231
215
} ) ;
232
216
233
217
it ( 'should use the default project prefix if none is passed' , async ( ) => {
234
218
const options = { ...defaultOptions , prefix : undefined } ;
235
219
236
- const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree )
237
- . toPromise ( ) ;
220
+ const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree ) . toPromise ( ) ;
238
221
const content = tree . readContent ( '/projects/bar/src/app/foo/foo.component.ts' ) ;
239
222
expect ( content ) . toMatch ( / s e l e c t o r : ' a p p - f o o ' / ) ;
240
223
} ) ;
241
224
242
225
it ( 'should use the supplied prefix if it is ""' , async ( ) => {
243
226
const options = { ...defaultOptions , prefix : '' } ;
244
227
245
- const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree )
246
- . toPromise ( ) ;
228
+ const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree ) . toPromise ( ) ;
247
229
const content = tree . readContent ( '/projects/bar/src/app/foo/foo.component.ts' ) ;
248
230
expect ( content ) . toMatch ( / s e l e c t o r : ' f o o ' / ) ;
249
231
} ) ;
250
232
251
233
it ( 'should respect the inlineTemplate option' , async ( ) => {
252
234
const options = { ...defaultOptions , inlineTemplate : true } ;
253
- const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree )
254
- . toPromise ( ) ;
235
+ const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree ) . toPromise ( ) ;
255
236
const content = tree . readContent ( '/projects/bar/src/app/foo/foo.component.ts' ) ;
256
237
expect ( content ) . toMatch ( / t e m p l a t e : / ) ;
257
238
expect ( content ) . not . toMatch ( / t e m p l a t e U r l : / ) ;
@@ -260,8 +241,7 @@ describe('Component Schematic', () => {
260
241
261
242
it ( 'should respect the inlineStyle option' , async ( ) => {
262
243
const options = { ...defaultOptions , inlineStyle : true } ;
263
- const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree )
264
- . toPromise ( ) ;
244
+ const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree ) . toPromise ( ) ;
265
245
const content = tree . readContent ( '/projects/bar/src/app/foo/foo.component.ts' ) ;
266
246
expect ( content ) . toMatch ( / s t y l e s : \[ / ) ;
267
247
expect ( content ) . not . toMatch ( / s t y l e U r l s : / ) ;
@@ -270,8 +250,7 @@ describe('Component Schematic', () => {
270
250
271
251
it ( 'should respect the style option' , async ( ) => {
272
252
const options = { ...defaultOptions , style : Style . Sass } ;
273
- const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree )
274
- . toPromise ( ) ;
253
+ const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree ) . toPromise ( ) ;
275
254
const content = tree . readContent ( '/projects/bar/src/app/foo/foo.component.ts' ) ;
276
255
expect ( content ) . toMatch ( / s t y l e U r l s : \[ ' .\/ f o o .c o m p o n e n t .s a s s / ) ;
277
256
expect ( tree . files ) . toContain ( '/projects/bar/src/app/foo/foo.component.sass' ) ;
@@ -283,55 +262,49 @@ describe('Component Schematic', () => {
283
262
const routingModulePath = `/projects/bar/src/app/${ routingFileName } ` ;
284
263
const newTree = createAppModule ( appTree , routingModulePath ) ;
285
264
const options = { ...defaultOptions , module : routingFileName } ;
286
- const tree = await schematicRunner . runSchematicAsync ( 'component' , options , newTree )
287
- . toPromise ( ) ;
265
+ const tree = await schematicRunner . runSchematicAsync ( 'component' , options , newTree ) . toPromise ( ) ;
288
266
const content = tree . readContent ( routingModulePath ) ;
289
267
expect ( content ) . toMatch ( / i m p o r t { F o o C o m p o n e n t } f r o m ' .\/ f o o \/ f o o .c o m p o n e n t / ) ;
290
268
} ) ;
291
269
292
270
it ( 'should handle a path in the name option' , async ( ) => {
293
271
const options = { ...defaultOptions , name : 'dir/test-component' } ;
294
272
295
- const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree )
296
- . toPromise ( ) ;
273
+ const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree ) . toPromise ( ) ;
297
274
const content = tree . readContent ( '/projects/bar/src/app/app.module.ts' ) ;
298
275
expect ( content ) . toMatch (
299
276
// tslint:disable-next-line:max-line-length
300
- / i m p o r t { T e s t C o m p o n e n t C o m p o n e n t } f r o m ' \. \/ d i r \/ t e s t - c o m p o n e n t \/ t e s t - c o m p o n e n t .c o m p o n e n t ' / ) ;
277
+ / i m p o r t { T e s t C o m p o n e n t C o m p o n e n t } f r o m ' \. \/ d i r \/ t e s t - c o m p o n e n t \/ t e s t - c o m p o n e n t .c o m p o n e n t ' / ,
278
+ ) ;
301
279
} ) ;
302
280
303
281
it ( 'should handle a path in the name and module options' , async ( ) => {
304
- appTree = await schematicRunner . runSchematicAsync (
305
- 'module' ,
306
- { name : 'admin/module' , project : 'bar' } ,
307
- appTree ,
308
- ) . toPromise ( ) ;
282
+ appTree = await schematicRunner
283
+ . runSchematicAsync ( 'module' , { name : 'admin/module' , project : 'bar' } , appTree )
284
+ . toPromise ( ) ;
309
285
310
286
const options = { ...defaultOptions , name : 'other/test-component' , module : 'admin/module' } ;
311
- appTree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree )
312
- . toPromise ( ) ;
287
+ appTree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree ) . toPromise ( ) ;
313
288
314
289
const content = appTree . readContent ( '/projects/bar/src/app/admin/module/module.module.ts' ) ;
315
290
expect ( content ) . toMatch (
316
291
// tslint:disable-next-line:max-line-length
317
- / i m p o r t { T e s t C o m p o n e n t C o m p o n e n t } f r o m ' ..\/ ..\/ o t h e r \/ t e s t - c o m p o n e n t \/ t e s t - c o m p o n e n t .c o m p o n e n t ' / ) ;
292
+ / i m p o r t { T e s t C o m p o n e n t C o m p o n e n t } f r o m ' ..\/ ..\/ o t h e r \/ t e s t - c o m p o n e n t \/ t e s t - c o m p o n e n t .c o m p o n e n t ' / ,
293
+ ) ;
318
294
} ) ;
319
295
320
296
it ( 'should create the right selector with a path in the name' , async ( ) => {
321
297
const options = { ...defaultOptions , name : 'sub/test' } ;
322
- appTree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree )
323
- . toPromise ( ) ;
298
+ appTree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree ) . toPromise ( ) ;
324
299
const content = appTree . readContent ( '/projects/bar/src/app/sub/test/test.component.ts' ) ;
325
300
expect ( content ) . toMatch ( / s e l e c t o r : ' a p p - t e s t ' / ) ;
326
301
} ) ;
327
302
328
303
it ( 'should respect the skipSelector option' , async ( ) => {
329
304
const options = { ...defaultOptions , name : 'sub/test' , skipSelector : true } ;
330
- appTree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree )
331
- . toPromise ( ) ;
305
+ appTree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree ) . toPromise ( ) ;
332
306
const content = appTree . readContent ( '/projects/bar/src/app/sub/test/test.component.ts' ) ;
333
307
expect ( content ) . not . toMatch ( / s e l e c t o r : ' a p p - t e s t ' / ) ;
334
- console . log ( content ) ;
335
308
} ) ;
336
309
337
310
it ( 'should respect the sourceRoot value' , async ( ) => {
@@ -346,42 +319,38 @@ describe('Component Schematic', () => {
346
319
347
320
// move the module
348
321
appTree . rename ( '/projects/bar/src/app/app.module.ts' , '/projects/bar/custom/app/app.module.ts' ) ;
349
- appTree = await schematicRunner . runSchematicAsync ( 'component' , defaultOptions , appTree )
322
+ appTree = await schematicRunner
323
+ . runSchematicAsync ( 'component' , defaultOptions , appTree )
350
324
. toPromise ( ) ;
351
325
expect ( appTree . files ) . toContain ( '/projects/bar/custom/app/foo/foo.component.ts' ) ;
352
326
} ) ;
353
327
354
328
// testing deprecating options don't cause conflicts
355
329
it ( 'should respect the deprecated styleext (scss) option' , async ( ) => {
356
330
const options = { ...defaultOptions , style : undefined , styleext : 'scss' } ;
357
- const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree )
358
- . toPromise ( ) ;
331
+ const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree ) . toPromise ( ) ;
359
332
const files = tree . files ;
360
333
expect ( files ) . toContain ( '/projects/bar/src/app/foo/foo.component.scss' ) ;
361
334
} ) ;
362
335
363
336
it ( 'should respect the deprecated styleext (css) option' , async ( ) => {
364
337
const options = { ...defaultOptions , style : undefined , styleext : 'css' } ;
365
- const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree )
366
- . toPromise ( ) ;
338
+ const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree ) . toPromise ( ) ;
367
339
const files = tree . files ;
368
340
expect ( files ) . toContain ( '/projects/bar/src/app/foo/foo.component.css' ) ;
369
341
} ) ;
370
342
371
343
it ( 'should respect the deprecated spec option when false' , async ( ) => {
372
344
const options = { ...defaultOptions , skipTests : undefined , spec : false } ;
373
- const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree )
374
- . toPromise ( ) ;
345
+ const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree ) . toPromise ( ) ;
375
346
const files = tree . files ;
376
347
expect ( files ) . not . toContain ( '/projects/bar/src/app/foo/foo.component.spec.ts' ) ;
377
348
} ) ;
378
349
379
350
it ( 'should respect the deprecated spec option when true' , async ( ) => {
380
351
const options = { ...defaultOptions , skipTests : false , spec : true } ;
381
- const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree )
382
- . toPromise ( ) ;
352
+ const tree = await schematicRunner . runSchematicAsync ( 'component' , options , appTree ) . toPromise ( ) ;
383
353
const files = tree . files ;
384
354
expect ( files ) . toContain ( '/projects/bar/src/app/foo/foo.component.spec.ts' ) ;
385
355
} ) ;
386
-
387
356
} ) ;
0 commit comments