angular-docs-cn/packages/language-service/test/project/app
Keen Yee Liau 2dffe65cfd fix(language-service): completions after "let x of |" in ngFor (#34473)
This commit fixes a bug in which we do testing for completions.
Subsequently, this exposes another bug in our implementation whereby
suggestions are not provided in "ngFor" where there should have been.

Currently, multiple test cases are grouped together in a single
template. This requires the template to be somewhat complete so that
test cases that depend on variables declared earlier would pass.

Consider the following example:

```
  template: `
    <div *ngFor="let ~{for-person}person of ~{for-people}people">
      <span>Name: {{~{for-interp-person}person.~{for-interp-name}name}}</span>
      <span>Age: {{person.~{for-interp-age}age}}</span>
    </div>`,
```

In order to test `~{for-interp-person}`, `people` has to be included after
`~{for-people}`. This means the test case for `~{for-people}` is not
reflective of the actual use case because the variable is already there!
In real case, the expression would be incomplete, and our implementation
failed to take that into account.

This commit breaks such test into individual tests, and fix the bugs in
the underlying implementation.

PR Close #34473
2019-12-19 11:34:03 -08:00
..
app.component.ts fix(language-service): Turn on strict mode for test project (#32783) 2019-10-01 11:01:01 -07:00
expression-cases.ts test(language-service): Remove redundant marker methods in MockHost (#33115) 2019-10-14 16:20:55 +00:00
main.ts fix(language-service): completions after "let x of |" in ngFor (#34473) 2019-12-19 11:34:03 -08:00
ng-for-cases.ts test(language-service): Remove redundant marker methods in MockHost (#33115) 2019-10-14 16:20:55 +00:00
ng-if-cases.ts test(language-service): Remove redundant marker methods in MockHost (#33115) 2019-10-14 16:20:55 +00:00
parsing-cases.ts fix(language-service): completions after "let x of |" in ngFor (#34473) 2019-12-19 11:34:03 -08:00
test.css test(language-service): Create proper test project (#32653) 2019-09-18 13:07:01 -07:00
test.ng fix(language-service): Proper completions for properties and events (#34445) 2019-12-18 09:13:31 -08:00