Allow passing an optional timeout to Testability's whenStable(). If specified, if Angular is not stable before the timeout is hit, the done callback will be invoked with a list of pending macrotasks. Also, allows an optional update callback, which will be invoked whenever the set of pending macrotasks changes. If this callback returns true, the timeout will be cancelled and the done callback will not be invoked. If the optional parameters are not passed, whenStable() will work as it did before, whether or not the task tracking zone spec is available. This change also migrates the Testability unit tests off the deprecated AsyncTestCompleter. PR Close #16863
		
			
				
	
	
		
			26 lines
		
	
	
		
			515 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			515 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| /** @externs */
 | |
| 
 | |
| /** @record @struct */
 | |
| function PublicTestability() {}
 | |
| 
 | |
| /**
 | |
|  * @return {?}
 | |
|  */
 | |
| PublicTestability.prototype.isStable = function() {};
 | |
| 
 | |
| /**
 | |
|  * @param {?} callback
 | |
|  * @param {?} timeout
 | |
|  * @param {?} updateCallback
 | |
|  * @return {?}
 | |
|  */
 | |
| PublicTestability.prototype.whenStable = function(callback, timeout, updateCallback) {};
 | |
| 
 | |
| /**
 | |
|  * @param {?} using
 | |
|  * @param {?} provider
 | |
|  * @param {?} exactMatch
 | |
|  * @return {?}
 | |
|  */
 | |
| PublicTestability.prototype.findProviders = function(using, provider, exactMatch) {};
 |