BREAKING CHANGE Before import * as p from 'angular2/profile'; import * as t from 'angular2/tools'; After import * as p from 'angular2/instrumentation'; import * as t from 'angular2/platform/browser';
		
			
				
	
	
		
			23 lines
		
	
	
		
			751 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			751 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import {SpyObject} from 'angular2/testing_internal';
 | 
						|
import {Injector, provide} from 'angular2/core';
 | 
						|
import {ComponentRef} from 'angular2/src/core/linker/dynamic_component_loader';
 | 
						|
import {global} from 'angular2/src/facade/lang';
 | 
						|
import {ApplicationRef, ApplicationRef_} from 'angular2/src/core/application_ref';
 | 
						|
 | 
						|
export class SpyApplicationRef extends SpyObject {
 | 
						|
  constructor() { super(ApplicationRef_); }
 | 
						|
}
 | 
						|
 | 
						|
export class SpyComponentRef extends SpyObject {
 | 
						|
  injector;
 | 
						|
  constructor() {
 | 
						|
    super();
 | 
						|
    this.injector =
 | 
						|
        Injector.resolveAndCreate([provide(ApplicationRef, {useClass: SpyApplicationRef})]);
 | 
						|
  }
 | 
						|
}
 | 
						|
 | 
						|
export function callNgProfilerTimeChangeDetection(config?): void {
 | 
						|
  (<any>global).ng.profiler.timeChangeDetection(config);
 | 
						|
}
 |