This commit converts the DI compliance tests taken from `r3_view_compiler_di_spec.ts` to the new test runner. PR Close #39863
		
			
				
	
	
		
			19 lines
		
	
	
		
			518 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			518 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| /**
 | |
|  * @license
 | |
|  * Copyright Google LLC All Rights Reserved.
 | |
|  *
 | |
|  * Use of this source code is governed by an MIT-style license that can be
 | |
|  * found in the LICENSE file at https://angular.io/license
 | |
|  */
 | |
| 
 | |
| /**
 | |
|  * Verifies that there is exactly one factory definition for the provided type.
 | |
|  */
 | |
| export function verifyUniqueFactory(output: string, type: string): boolean {
 | |
|   const matches = output.match(new RegExp(type + '\.ɵfac =', 'g'));
 | |
|   if (matches === null) {
 | |
|     return false;
 | |
|   }
 | |
|   return matches.length === 1;
 | |
| }
 |