@@ -13,55 +13,47 @@ export default function () {
13
13
. then ( ( ) => ng ( 'generate' , 'module' , 'sub/deep' ) )
14
14
15
15
. then ( ( ) => ng ( 'generate' , 'module' , 'test1' , '--module' , 'app.module.ts' ) )
16
- . then ( ( ) =>
17
- expectFileToMatch ( modulePath , / i m p o r t { T e s t 1 M o d u l e } f r o m ' .\/ t e s t 1 \/ t e s t 1 .m o d u l e ' / ) ,
18
- )
19
- . then ( ( ) => expectFileToMatch ( modulePath , / i m p o r t s : \[ ( .| \s ) * T e s t 1 M o d u l e ( .| \s ) * \] / m) )
16
+ . then ( ( ) => expectFileToMatch ( modulePath , `import { Test1Module } from './test1/test1.module'` ) )
17
+ . then ( ( ) => expectFileToMatch ( modulePath , / i m p o r t s : \[ .* ?T e s t 1 M o d u l e .* ?\] / s) )
20
18
21
19
. then ( ( ) => ng ( 'generate' , 'module' , 'test2' , '--module' , 'app.module' ) )
22
- . then ( ( ) =>
23
- expectFileToMatch ( modulePath , / i m p o r t { T e s t 2 M o d u l e } f r o m ' .\/ t e s t 2 \/ t e s t 2 .m o d u l e ' / ) ,
24
- )
25
- . then ( ( ) => expectFileToMatch ( modulePath , / i m p o r t s : \[ ( .| \s ) * T e s t 2 M o d u l e ( .| \s ) * \] / m) )
20
+ . then ( ( ) => expectFileToMatch ( modulePath , `import { Test2Module } from './test2/test2.module'` ) )
21
+ . then ( ( ) => expectFileToMatch ( modulePath , / i m p o r t s : \[ .* ?T e s t 2 M o d u l e .* ?\] / s) )
26
22
27
23
. then ( ( ) => ng ( 'generate' , 'module' , 'test3' , '--module' , 'app' ) )
28
- . then ( ( ) =>
29
- expectFileToMatch ( modulePath , / i m p o r t { T e s t 3 M o d u l e } f r o m ' .\/ t e s t 3 \/ t e s t 3 .m o d u l e ' / ) ,
30
- )
31
- . then ( ( ) => expectFileToMatch ( modulePath , / i m p o r t s : \[ ( .| \s ) * T e s t 3 M o d u l e ( .| \s ) * \] / m) )
24
+ . then ( ( ) => expectFileToMatch ( modulePath , `import { Test3Module } from './test3/test3.module'` ) )
25
+ . then ( ( ) => expectFileToMatch ( modulePath , / i m p o r t s : \[ .* ?T e s t 3 M o d u l e .* ?\] / s) )
32
26
33
27
. then ( ( ) => ng ( 'generate' , 'module' , 'test4' , '--routing' , '--module' , 'app' ) )
34
- . then ( ( ) => expectFileToMatch ( modulePath , / i m p o r t s : \[ ( . | \s ) * T e s t 4 M o d u l e ( . | \s ) * \] / m ) )
28
+ . then ( ( ) => expectFileToMatch ( modulePath , / i m p o r t s : \[ . * ? T e s t 4 M o d u l e . * ? \] / s ) )
35
29
. then ( ( ) =>
36
30
expectFileToMatch (
37
31
join ( 'src' , 'app' , 'test4' , 'test4.module.ts' ) ,
38
- / i m p o r t { T e s t 4 R o u t i n g M o d u l e } f r o m ' .\ /t e s t 4 - r o u t i n g .m o d u l e ' / ,
32
+ ` import { Test4RoutingModule } from './test4-routing.module'` ,
39
33
) ,
40
34
)
41
35
. then ( ( ) =>
42
36
expectFileToMatch (
43
37
join ( 'src' , 'app' , 'test4' , 'test4.module.ts' ) ,
44
- / i m p o r t s : \[ ( . | \s ) * T e s t 4 R o u t i n g M o d u l e ( . | \s ) * \] / m ,
38
+ / i m p o r t s : \[ . * ? T e s t 4 R o u t i n g M o d u l e . * ? \] / s ,
45
39
) ,
46
40
)
47
41
48
42
. then ( ( ) => ng ( 'generate' , 'module' , 'test5' , '--module' , 'sub' ) )
49
43
. then ( ( ) =>
50
- expectFileToMatch ( subModulePath , / i m p o r t { T e s t 5 M o d u l e } f r o m ' ..\ /t e s t 5 \ /t e s t 5 .m o d u l e ' / ) ,
44
+ expectFileToMatch ( subModulePath , ` import { Test5Module } from '../test5/test5.module'` ) ,
51
45
)
52
- . then ( ( ) => expectFileToMatch ( subModulePath , / i m p o r t s : \[ ( . | \s ) * T e s t 5 M o d u l e ( . | \s ) * \] / m ) )
46
+ . then ( ( ) => expectFileToMatch ( subModulePath , / i m p o r t s : \[ . * ? T e s t 5 M o d u l e . * ? \] / s ) )
53
47
54
48
. then ( ( ) =>
55
49
ng ( 'generate' , 'module' , 'test6' , '--module' , join ( 'sub' , 'deep' ) )
56
50
. then ( ( ) =>
57
51
expectFileToMatch (
58
52
deepSubModulePath ,
59
- / i m p o r t { T e s t 6 M o d u l e } f r o m ' ..\ / ..\ /t e s t 6 \ /t e s t 6 .m o d u l e ' / ,
53
+ ` import { Test6Module } from '../../test6/test6.module'` ,
60
54
) ,
61
55
)
62
- . then ( ( ) =>
63
- expectFileToMatch ( deepSubModulePath , / i m p o r t s : \[ ( .| \s ) * T e s t 6 M o d u l e ( .| \s ) * \] / m) ,
64
- ) ,
56
+ . then ( ( ) => expectFileToMatch ( deepSubModulePath , / i m p o r t s : \[ .* ?T e s t 6 M o d u l e .* ?\] / s) ) ,
65
57
) ;
66
58
67
59
// E2E_DISABLE: temporarily disable pending investigation
0 commit comments