`main()` function used to be needed to support dart, since dart Does not allow top level statements. Since we no longer use dart The need for `main()` has been removed. In preparation for `Basel` and standardized way of running tests we are removing `main()` PR Close #21053
		
			
				
	
	
		
			28 lines
		
	
	
		
			693 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			693 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| /**
 | |
|  * @license
 | |
|  * Copyright Google Inc. 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
 | |
|  */
 | |
| 
 | |
| import {describe, expect, it} from '@angular/core/testing/src/testing_internal';
 | |
| 
 | |
| {
 | |
|   describe('Shim', () => {
 | |
| 
 | |
|     it('should provide correct function.name ', () => {
 | |
|       const functionWithoutName = identity(() => function(_: any /** TODO #9100 */) {});
 | |
|       function foo(_: any /** TODO #9100 */) {}
 | |
| 
 | |
|       expect((<any>functionWithoutName).name).toBeFalsy();
 | |
|       expect((<any>foo).name).toEqual('foo');
 | |
|     });
 | |
| 
 | |
|   });
 | |
| }
 | |
| 
 | |
| function identity(a: any /** TODO #9100 */) {
 | |
|   return a;
 | |
| }
 |