From 1dd0b6cc18b0fe9112cd2c7be745ef5a788642aa Mon Sep 17 00:00:00 2001 From: Keen Yee Liau Date: Mon, 6 Apr 2020 19:47:29 -0700 Subject: [PATCH] test(language-service): remove ng-if-cases.ts (#36470) This commit removes ng-if-cases.ts and moves all test cases to inline expressions in TEST_TEMPLATE. PR Close #36470 --- .../language-service/test/project/app/main.ts | 2 -- .../test/project/app/ng-if-cases.ts | 19 ------------------- .../language-service/test/ts_plugin_spec.ts | 4 ++-- 3 files changed, 2 insertions(+), 23 deletions(-) delete mode 100644 packages/language-service/test/project/app/ng-if-cases.ts diff --git a/packages/language-service/test/project/app/main.ts b/packages/language-service/test/project/app/main.ts index 27f0f8d17c..8a9a97f805 100644 --- a/packages/language-service/test/project/app/main.ts +++ b/packages/language-service/test/project/app/main.ts @@ -11,7 +11,6 @@ import {NgModule} from '@angular/core'; import {FormsModule} from '@angular/forms'; import {AppComponent} from './app.component'; import * as NgForCases from './ng-for-cases'; -import * as NgIfCases from './ng-if-cases'; import * as ParsingCases from './parsing-cases'; @NgModule({ @@ -21,7 +20,6 @@ import * as ParsingCases from './parsing-cases'; NgForCases.UnknownEven, NgForCases.UnknownPeople, NgForCases.UnknownTrackBy, - NgIfCases.ShowIf, ParsingCases.AsyncForUsingComponent, ParsingCases.CaseIncompleteOpen, ParsingCases.CaseMissingClosing, diff --git a/packages/language-service/test/project/app/ng-if-cases.ts b/packages/language-service/test/project/app/ng-if-cases.ts deleted file mode 100644 index 3c9917d772..0000000000 --- a/packages/language-service/test/project/app/ng-if-cases.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * @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 {Component} from '@angular/core'; - -@Component({ - template: ` -
- Showing now! -
`, -}) -export class ShowIf { - show = false; -} diff --git a/packages/language-service/test/ts_plugin_spec.ts b/packages/language-service/test/ts_plugin_spec.ts index 84817cf1ad..3831e67fe2 100644 --- a/packages/language-service/test/ts_plugin_spec.ts +++ b/packages/language-service/test/ts_plugin_spec.ts @@ -57,8 +57,8 @@ describe('plugin', () => { const compilerDiags = tsLS.getCompilerOptionsDiagnostics(); expect(compilerDiags).toEqual([]); const sourceFiles = program.getSourceFiles().filter(f => !f.fileName.endsWith('.d.ts')); - // there are five .ts files in the test project - expect(sourceFiles.length).toBe(5); + // there are three .ts files in the test project + expect(sourceFiles.length).toBe(3); for (const {fileName} of sourceFiles) { const syntacticDiags = tsLS.getSyntacticDiagnostics(fileName); expect(syntacticDiags).toEqual([]);