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
This commit is contained in:
parent
e0415dbf16
commit
1dd0b6cc18
|
@ -11,7 +11,6 @@ import {NgModule} from '@angular/core';
|
||||||
import {FormsModule} from '@angular/forms';
|
import {FormsModule} from '@angular/forms';
|
||||||
import {AppComponent} from './app.component';
|
import {AppComponent} from './app.component';
|
||||||
import * as NgForCases from './ng-for-cases';
|
import * as NgForCases from './ng-for-cases';
|
||||||
import * as NgIfCases from './ng-if-cases';
|
|
||||||
import * as ParsingCases from './parsing-cases';
|
import * as ParsingCases from './parsing-cases';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -21,7 +20,6 @@ import * as ParsingCases from './parsing-cases';
|
||||||
NgForCases.UnknownEven,
|
NgForCases.UnknownEven,
|
||||||
NgForCases.UnknownPeople,
|
NgForCases.UnknownPeople,
|
||||||
NgForCases.UnknownTrackBy,
|
NgForCases.UnknownTrackBy,
|
||||||
NgIfCases.ShowIf,
|
|
||||||
ParsingCases.AsyncForUsingComponent,
|
ParsingCases.AsyncForUsingComponent,
|
||||||
ParsingCases.CaseIncompleteOpen,
|
ParsingCases.CaseIncompleteOpen,
|
||||||
ParsingCases.CaseMissingClosing,
|
ParsingCases.CaseMissingClosing,
|
||||||
|
|
|
@ -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: `
|
|
||||||
<div ~{start-implicit}*ngIf="show; let l=unknown"~{end-implicit}>
|
|
||||||
Showing now!
|
|
||||||
</div>`,
|
|
||||||
})
|
|
||||||
export class ShowIf {
|
|
||||||
show = false;
|
|
||||||
}
|
|
|
@ -57,8 +57,8 @@ describe('plugin', () => {
|
||||||
const compilerDiags = tsLS.getCompilerOptionsDiagnostics();
|
const compilerDiags = tsLS.getCompilerOptionsDiagnostics();
|
||||||
expect(compilerDiags).toEqual([]);
|
expect(compilerDiags).toEqual([]);
|
||||||
const sourceFiles = program.getSourceFiles().filter(f => !f.fileName.endsWith('.d.ts'));
|
const sourceFiles = program.getSourceFiles().filter(f => !f.fileName.endsWith('.d.ts'));
|
||||||
// there are five .ts files in the test project
|
// there are three .ts files in the test project
|
||||||
expect(sourceFiles.length).toBe(5);
|
expect(sourceFiles.length).toBe(3);
|
||||||
for (const {fileName} of sourceFiles) {
|
for (const {fileName} of sourceFiles) {
|
||||||
const syntacticDiags = tsLS.getSyntacticDiagnostics(fileName);
|
const syntacticDiags = tsLS.getSyntacticDiagnostics(fileName);
|
||||||
expect(syntacticDiags).toEqual([]);
|
expect(syntacticDiags).toEqual([]);
|
||||||
|
|
Loading…
Reference in New Issue