fix(language-service): apply suggested change. (#34564)

PR Close #34564
This commit is contained in:
ivanwonder
2020-01-06 10:37:49 +08:00
committed by atscott
parent 76d7aa7b19
commit b3af2202b9
2 changed files with 8 additions and 7 deletions

View File

@ -314,11 +314,8 @@ describe('definitions', () => {
expect(def.name).toBe('model');
expect(def.kind).toBe('property');
const content = mockHost.readFile(refFileName) !;
const ref = `@Input() model: string = 'model';`;
expect(def.textSpan).toEqual({
start: content.indexOf(ref),
length: ref.length,
});
expect(content.substring(def.textSpan.start, def.textSpan.start + def.textSpan.length))
.toEqual(`@Input() model: string = 'model';`);
});
it('should be able to find a template from a url', () => {