@@ -9,6 +9,7 @@ import * as clean from './clean';
99import * as lint from './lint' ;
1010import * as minify from './minify' ;
1111import * as ngc from './ngc' ;
12+ import * as postprocess from './postprocess' ;
1213import * as preprocess from './preprocess' ;
1314import * as sass from './sass' ;
1415import * as transpile from './transpile' ;
@@ -26,15 +27,16 @@ describe('build', () => {
2627 } ) ;
2728
2829
29- spyOn ( bundle , 'bundle' ) . and . returnValue ( Promise . resolve ( ) ) ;
30- spyOn ( copy , 'copy' ) . and . returnValue ( Promise . resolve ( ) ) ;
31- spyOn ( minify , 'minifyCss' ) . and . returnValue ( Promise . resolve ( ) ) ;
32- spyOn ( minify , 'minifyJs' ) . and . returnValue ( Promise . resolve ( ) ) ;
33- spyOn ( lint , 'lint' ) . and . returnValue ( Promise . resolve ( ) ) ;
34- spyOn ( ngc , 'ngc' ) . and . returnValue ( Promise . resolve ( ) ) ;
35- spyOn ( preprocess , 'preprocess' ) . and . returnValue ( Promise . resolve ( ) ) ;
36- spyOn ( sass , 'sass' ) . and . returnValue ( Promise . resolve ( ) ) ;
37- spyOn ( transpile , 'transpile' ) . and . returnValue ( Promise . resolve ( ) ) ;
30+ spyOn ( bundle , bundle . bundle . name ) . and . returnValue ( Promise . resolve ( ) ) ;
31+ spyOn ( copy , copy . copy . name ) . and . returnValue ( Promise . resolve ( ) ) ;
32+ spyOn ( minify , minify . minifyCss . name ) . and . returnValue ( Promise . resolve ( ) ) ;
33+ spyOn ( minify , minify . minifyJs . name ) . and . returnValue ( Promise . resolve ( ) ) ;
34+ spyOn ( lint , lint . lint . name ) . and . returnValue ( Promise . resolve ( ) ) ;
35+ spyOn ( ngc , ngc . ngc . name ) . and . returnValue ( Promise . resolve ( ) ) ;
36+ spyOn ( postprocess , postprocess . postprocess . name ) . and . returnValue ( Promise . resolve ( ) ) ;
37+ spyOn ( preprocess , preprocess . preprocess . name ) . and . returnValue ( Promise . resolve ( ) ) ;
38+ spyOn ( sass , sass . sass . name ) . and . returnValue ( Promise . resolve ( ) ) ;
39+ spyOn ( transpile , transpile . transpile . name ) . and . returnValue ( Promise . resolve ( ) ) ;
3840 } ) ;
3941
4042 it ( 'should do a prod build' , ( ) => {
@@ -79,6 +81,7 @@ describe('build', () => {
7981 expect ( bundle . bundle ) . toHaveBeenCalled ( ) ;
8082 expect ( sass . sass ) . toHaveBeenCalled ( ) ;
8183 expect ( lint . lint ) . toHaveBeenCalled ( ) ;
84+ expect ( postprocess . postprocess ) . toHaveBeenCalled ( ) ;
8285 expect ( preprocess . preprocess ) . toHaveBeenCalled ( ) ;
8386 expect ( ngc . ngc ) . not . toHaveBeenCalled ( ) ;
8487 expect ( minify . minifyJs ) . not . toHaveBeenCalled ( ) ;
@@ -162,17 +165,18 @@ describe('test project requirements before building', () => {
162165 process . env [ Constants . ENV_APP_ENTRY_POINT ] = 'src/app/main.ts' ;
163166 process . env [ Constants . ENV_TS_CONFIG ] = 'tsConfig.js' ;
164167
165- spyOn ( bundle , 'bundle' ) . and . returnValue ( Promise . resolve ( ) ) ;
166- spyOn ( clean , 'clean' ) ;
167- spyOn ( copy , 'copy' ) . and . returnValue ( Promise . resolve ( ) ) ;
168- spyOn ( minify , 'minifyCss' ) . and . returnValue ( Promise . resolve ( ) ) ;
169- spyOn ( minify , 'minifyJs' ) . and . returnValue ( Promise . resolve ( ) ) ;
170- spyOn ( lint , 'lint' ) . and . returnValue ( Promise . resolve ( ) ) ;
171- spyOn ( ngc , 'ngc' ) . and . returnValue ( Promise . resolve ( ) ) ;
172- spyOn ( preprocess , 'preprocess' ) . and . returnValue ( Promise . resolve ( ) ) ;
173- spyOn ( sass , 'sass' ) . and . returnValue ( Promise . resolve ( ) ) ;
174- spyOn ( transpile , 'transpile' ) . and . returnValue ( Promise . resolve ( ) ) ;
175- spyOn ( helpers , 'readFileAsync' ) . and . callFake ( ( ) => {
168+ spyOn ( bundle , bundle . bundle . name ) . and . returnValue ( Promise . resolve ( ) ) ;
169+ spyOn ( clean , clean . clean . name ) ;
170+ spyOn ( copy , copy . copy . name ) . and . returnValue ( Promise . resolve ( ) ) ;
171+ spyOn ( minify , minify . minifyCss . name ) . and . returnValue ( Promise . resolve ( ) ) ;
172+ spyOn ( minify , minify . minifyJs . name ) . and . returnValue ( Promise . resolve ( ) ) ;
173+ spyOn ( lint , lint . lint . name ) . and . returnValue ( Promise . resolve ( ) ) ;
174+ spyOn ( ngc , ngc . ngc . name ) . and . returnValue ( Promise . resolve ( ) ) ;
175+ spyOn ( postprocess , postprocess . postprocess . name ) . and . returnValue ( Promise . resolve ( ) ) ;
176+ spyOn ( preprocess , preprocess . preprocess . name ) . and . returnValue ( Promise . resolve ( ) ) ;
177+ spyOn ( sass , sass . sass . name ) . and . returnValue ( Promise . resolve ( ) ) ;
178+ spyOn ( transpile , transpile . transpile . name ) . and . returnValue ( Promise . resolve ( ) ) ;
179+ spyOn ( helpers , helpers . readFileAsync . name ) . and . callFake ( ( ) => {
176180 return Promise . resolve ( `{
177181 "compilerOptions": {
178182 "sourceMap": true
0 commit comments