clang-format was recently updated and any PRs that touch files in the language service will have to reformat all the files. Instead of changing the formatting in those PRs, this PR formats all files in language-service package once and for all. PR Close #36426
		
			
				
	
	
		
			29 lines
		
	
	
		
			980 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			980 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 * as ts from 'typescript/lib/tsserverlibrary';
 | |
| 
 | |
| import {createGlobalSymbolTable, EMPTY_SYMBOL_TABLE} from '../src/global_symbols';
 | |
| import {getSymbolQuery} from '../src/typescript_symbols';
 | |
| 
 | |
| import {MockTypescriptHost} from './test_utils';
 | |
| 
 | |
| describe('GlobalSymbolTable', () => {
 | |
|   const mockHost = new MockTypescriptHost([]);
 | |
|   const tsLS = ts.createLanguageService(mockHost);
 | |
| 
 | |
|   it(`contains $any()`, () => {
 | |
|     const program = tsLS.getProgram()!;
 | |
|     const typeChecker = program.getTypeChecker();
 | |
|     const source = ts.createSourceFile('foo.ts', '', ts.ScriptTarget.ES2015);
 | |
|     const query = getSymbolQuery(program, typeChecker, source, () => EMPTY_SYMBOL_TABLE);
 | |
|     const table = createGlobalSymbolTable(query);
 | |
|     expect(table.has('$any')).toBe(true);
 | |
|   });
 | |
| });
 |