1- /* import { BuildContext } from './util/interfaces';
1+ import  {  BuildContext  }  from  './util/interfaces' ; 
22
33import  *  as  helpers  from  './util/helpers' ; 
4+ import  *  as  clean  from  './clean' ; 
45import  *  as  build  from  './build' ; 
56import  *  as  bundle  from  './bundle' ; 
67import  *  as  copy  from  './copy' ; 
@@ -12,6 +13,7 @@ import * as transpile from './transpile';
1213
1314describe ( 'build' ,  ( )  =>  { 
1415 beforeEach ( ( )  =>  { 
16+  spyOn ( clean ,  'clean' ) ; 
1517 spyOn ( helpers ,  'readFileAsync' ) . and . returnValue ( Promise . resolve ( ) ) ; 
1618 spyOn ( copy ,  'copy' ) . and . returnValue ( Promise . resolve ( ) ) ; 
1719 spyOn ( ngc ,  'ngc' ) . and . returnValue ( Promise . resolve ( ) ) ; 
@@ -23,7 +25,7 @@ describe('build', () => {
2325 spyOn ( transpile ,  'transpile' ) . and . returnValue ( Promise . resolve ( ) ) ; 
2426 } ) ; 
2527
26-  it('should do a prod build', (done: Function ) => { 
28+  it ( 'should do a prod build' ,  ( )  =>  { 
2729 let  context : BuildContext  =  { 
2830 isProd : true , 
2931 optimizeJs : true , 
@@ -32,7 +34,7 @@ describe('build', () => {
3234 runAot : true 
3335 } ; 
3436
35-  build.build(context).then(() => { 
37+  return   build . build ( context ) . then ( ( )  =>  { 
3638 expect ( helpers . readFileAsync ) . toHaveBeenCalled ( ) ; 
3739 expect ( copy . copy ) . toHaveBeenCalled ( ) ; 
3840 expect ( ngc . ngc ) . toHaveBeenCalled ( ) ; 
@@ -43,7 +45,6 @@ describe('build', () => {
4345 expect ( lint . lint ) . toHaveBeenCalled ( ) ; 
4446
4547 expect ( transpile . transpile ) . not . toHaveBeenCalled ( ) ; 
46-  done(); 
4748 } ) . catch ( err  =>  { 
4849 console . log ( `err.message: ` ,  err . message ) ; 
4950 expect ( true ) . toEqual ( false ) ; 
@@ -78,4 +79,3 @@ describe('build', () => {
7879 } ) ; 
7980
8081} ) ; 
81- */ 
0 commit comments