@@ -20,22 +20,33 @@ export default function () {
20
20
throw new Error ( 'Expected to have missing dependency error in output.' ) ;
21
21
}
22
22
} )
23
+ // Warning should show.
23
24
. then ( ( ) => npm ( 'install' , `typescript@${ unsupportedTsVersion } ` , '--no-save' ) )
24
25
. then ( ( ) => ng ( 'build' ) )
25
26
. then ( ( output ) => {
26
27
if ( ! output . stdout . match ( 'Using this version can result in undefined behaviour' ) ) {
27
28
throw new Error ( 'Expected to have typescript version mismatch warning in output.' ) ;
28
29
}
29
30
} )
31
+ // Warning should be disabled with global flag.
30
32
. then ( ( ) => ng ( 'set' , '--global' , 'warnings.typescriptMismatch=false' ) )
31
33
. then ( ( ) => ng ( 'build' ) )
32
34
. then ( ( output ) => {
33
35
if ( output . stdout . match ( 'Using this version can result in undefined behaviour' ) ) {
34
36
throw new Error ( 'Expected to not have typescript version mismatch warning in output.' ) ;
35
37
}
36
38
} )
39
+ . then ( ( ) => ng ( 'set' , '--global' , 'warnings.typescriptMismatch=true' ) )
40
+ // Warning should be disabled with local flag.
41
+ . then ( ( ) => ng ( 'set' , 'warnings.typescriptMismatch=false' ) )
42
+ . then ( ( ) => ng ( 'build' ) )
43
+ . then ( ( output ) => {
44
+ if ( output . stdout . match ( 'Using this version can result in undefined behaviour' ) ) {
45
+ throw new Error ( 'Expected to not have typescript version mismatch warning in output.' ) ;
46
+ }
47
+ } )
48
+ . then ( ( ) => ng ( 'set' , 'warnings.typescriptMismatch=true' ) )
37
49
// Cleanup
38
- . then ( ( ) => npm ( 'install' ) )
39
- . then ( ( ) => ng ( 'set' , '--global' , 'warnings.typescriptMismatch=true' ) ) ;
50
+ . then ( ( ) => npm ( 'install' ) ) ;
40
51
}
41
52
0 commit comments