@@ -30,10 +30,31 @@ export default function () {
3030 . then ( ( ) => updateJsonFile ( '.angular-cli.json' , configJson => {
3131 const app = configJson [ 'apps' ] [ 0 ] ;
3232 app [ 'assets' ] = [
33- { 'glob' : '**/*' , 'input' : '../node_modules/some-package/' , 'output' : '../package-folder ' }
33+ { 'glob' : '**/*' , 'input' : '../node_modules/some-package/' , 'output' : '../temp ' }
3434 ] ;
3535 } ) )
3636 . then ( ( ) => expectToFail ( ( ) => ng ( 'build' ) ) )
37+
38+ // Set an exception for the invalid asset config in .angular-cli.json.
39+ . then ( ( ) => updateJsonFile ( '.angular-cli.json' , configJson => {
40+ const app = configJson [ 'apps' ] [ 0 ] ;
41+ app [ 'assets' ] = [
42+ { 'glob' : '**/*' , 'input' : '../node_modules/some-package/' , 'output' : '../temp' ,
43+ 'allowOutsideOutDir' : true }
44+ ] ;
45+ } ) )
46+ . then ( ( ) => ng ( 'build' ) )
47+
48+ // This asset should fail even with the exception above.
49+ . then ( ( ) => updateJsonFile ( '.angular-cli.json' , configJson => {
50+ const app = configJson [ 'apps' ] [ 0 ] ;
51+ app [ 'assets' ] = [
52+ { 'glob' : '**/*' , 'input' : '../node_modules/some-package/' , 'output' : '../../temp' ,
53+ 'allowOutsideOutDir' : true }
54+ ] ;
55+ } ) )
56+ . then ( ( ) => expectToFail ( ( ) => ng ( 'build' ) ) )
57+
3758 // Add asset config in .angular-cli.json.
3859 . then ( ( ) => updateJsonFile ( '.angular-cli.json' , configJson => {
3960 const app = configJson [ 'apps' ] [ 0 ] ;
0 commit comments