File tree 1 file changed +23
-0
lines changed
tests/e2e/tests/generate/component
1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { ng } from '../../../utils/process' ;
2
+ import { oneLine } from 'common-tags' ;
3
+
4
+ export default function ( ) {
5
+ return ng ( 'generate' , 'component' , 'test-component' )
6
+ . then ( ( output ) => {
7
+ if ( ! output . stdout . match ( / U P D A T E s r c [ \\ | \/ ] a p p [ \\ | \/ ] a p p .m o d u l e .t s / ) ) {
8
+ throw new Error ( oneLine `
9
+ Expected to match
10
+ "UPDATE src/app/app.module.ts"
11
+ in ${ output . stdout } .` ) ;
12
+ }
13
+ } )
14
+ . then ( ( ) => ng ( 'generate' , 'component' , 'test-component' ) )
15
+ . then ( ( output ) => {
16
+ if ( ! output . stdout . match ( / E R R O R ! s r c [ \\ | \/ ] a p p [ \\ | \/ ] 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 .t s a l r e a d y e x i s t s ./ ) ) {
17
+ throw new Error ( oneLine `
18
+ Expected to match
19
+ "ERROR! src/app/test-component/test-component.ts"
20
+ in ${ output . stdout } .` ) ;
21
+ }
22
+ } ) ;
23
+ }
You can’t perform that action at this time.
0 commit comments