test(language-service): Inline test cases in parsing-cases.ts (#36495)

This commit removes individual components from parsing-cases.ts and
colocate them with the actual tests. This makes the tests more readable.

PR Close #36495
This commit is contained in:
Keen Yee Liau
2020-04-07 14:58:39 -07:00
committed by Kara Erickson
parent 41667de778
commit e485236502
5 changed files with 45 additions and 69 deletions

View File

@ -342,7 +342,7 @@ describe('diagnostics', () => {
expect(category).toBe(ts.DiagnosticCategory.Error);
expect(messageText)
.toBe(
`Identifier 'missingField' is not defined. '{ implicitPerson: Person; }' does not contain such a member`,
`Identifier 'missingField' is not defined. '{ implicitPerson: Hero; }' does not contain such a member`,
);
const span = mockHost.getLocationMarkerFor(TEST_TEMPLATE, 'emb');
expect(start).toBe(span.start);
@ -361,7 +361,7 @@ describe('diagnostics', () => {
expect(category).toBe(ts.DiagnosticCategory.Error);
expect(messageText)
.toBe(
`Identifier 'missingField' is not defined. 'Person' does not contain such a member`,
`Identifier 'missingField' is not defined. 'Hero' does not contain such a member`,
);
const span = mockHost.getLocationMarkerFor(TEST_TEMPLATE, 'emb');
expect(start).toBe(span.start);