refactor(language-service): reformat using clang-format (#36426)

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
This commit is contained in:
Keen Yee Liau
2020-04-03 20:57:39 -07:00
committed by Kara Erickson
parent 7a33c456d3
commit e2b221b8fa
35 changed files with 686 additions and 412 deletions

View File

@ -15,7 +15,6 @@ import {TypeScriptServiceHost} from '../src/typescript_host';
import {MockTypescriptHost} from './test_utils';
describe('reflector_host_spec', () => {
// Regression #21811
it('should be able to find angular under windows', () => {
const originalJoin = path.join;
@ -24,15 +23,16 @@ describe('reflector_host_spec', () => {
new MockTypescriptHost(['/app/main.ts', '/app/parsing-cases.ts'], 'node_modules', {
...path,
join: (...args: string[]) => originalJoin.apply(path, args),
posix:
{...path.posix, join: (...args: string[]) => originalPosixJoin.apply(path, args)}
posix: {...path.posix, join: (...args: string[]) => originalPosixJoin.apply(path, args)}
});
const reflectorHost = new ReflectorHost(() => undefined as any, mockHost);
if (process.platform !== 'win32') {
// If we call this in Windows it will cause a 'Maximum call stack size exceeded error'
// Because we are spying on the same function that we are call faking
spyOn(path, 'join').and.callFake((...args: string[]) => { return path.win32.join(...args); });
spyOn(path, 'join').and.callFake((...args: string[]) => {
return path.win32.join(...args);
});
}
const result = reflectorHost.moduleNameToFileName('@angular/core');