File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
packages/upgrade/static/src Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ import {NgAdapterInjector} from './util';
116116 *
117117 * {@example upgrade/static/ts/full/module.ts region='bootstrap-ng1'}
118118 *
119- * Finally, kick off the whole process, by bootstraping your top level Angular `NgModule`.
119+ * Finally, kick off the whole process, by bootstrapping your top level Angular `NgModule`.
120120 *
121121 * {@example upgrade/static/ts/full/module.ts region='bootstrap-ng2'}
122122 *
@@ -236,7 +236,17 @@ export class UpgradeModule {
236236 } ) ;
237237 } ;
238238
239- ( wrappedInterval as any ) [ 'cancel' ] = intervalDelegate . cancel ;
239+ ( Object . keys ( intervalDelegate ) as ( keyof IIntervalService ) [ ] )
240+ . forEach ( prop => ( wrappedInterval as any ) [ prop ] = intervalDelegate [ prop ] ) ;
241+
242+ // the `flush` method will be present when ngMocks is used
243+ if ( intervalDelegate . hasOwnProperty ( 'flush' ) ) {
244+ ( wrappedInterval as any ) [ 'flush' ] = ( ) => {
245+ ( intervalDelegate as any ) [ 'flush' ] ( ) ;
246+ return wrappedInterval ;
247+ } ;
248+ }
249+
240250 return wrappedInterval ;
241251 }
242252 ] ) ;
You can’t perform that action at this time.
0 commit comments