@@ -14,17 +14,22 @@ import {TypeScriptServiceHost} from '../src/typescript_host';
14
14
15
15
import { MockTypescriptHost } from './test_utils' ;
16
16
17
- describe ( 'hover' , ( ) => {
18
- let mockHost : MockTypescriptHost ;
19
- let tsLS : ts . LanguageService ;
20
- let ngLSHost : TypeScriptServiceHost ;
21
- let ngLS : LanguageService ;
17
+ fdescribe ( 'hover' , ( ) => {
18
+ // const mockHost: MockTypescriptHost;
19
+ // const tsLS: ts.LanguageService;
20
+ // const ngLSHost: TypeScriptServiceHost;
21
+ // const ngLS: LanguageService;
22
+ const mockHost = new MockTypescriptHost ( [ '/app/main.ts' ] ) ;
23
+ const tsLS = ts . createLanguageService ( mockHost ) ;
24
+ const ngLSHost = new TypeScriptServiceHost ( mockHost , tsLS ) ;
25
+ const ngLS = createLanguageService ( ngLSHost ) ;
22
26
23
27
beforeEach ( ( ) => {
24
- mockHost = new MockTypescriptHost ( [ '/app/main.ts' , '/app/parsing-cases.ts' ] ) ;
25
- tsLS = ts . createLanguageService ( mockHost ) ;
26
- ngLSHost = new TypeScriptServiceHost ( mockHost , tsLS ) ;
27
- ngLS = createLanguageService ( ngLSHost ) ;
28
+ // mockHost = new MockTypescriptHost(['/app/main.ts', '/app/parsing-cases.ts']);
29
+ // tsLS = ts.createLanguageService(mockHost);
30
+ // ngLSHost = new TypeScriptServiceHost(mockHost, tsLS);
31
+ // ngLS = createLanguageService(ngLSHost);
32
+ mockHost . reset ( ) ;
28
33
} ) ;
29
34
30
35
it ( 'should be able to find field in an interpolation' , ( ) => {
@@ -183,20 +188,20 @@ describe('hover', () => {
183
188
} ) ;
184
189
185
190
it ( 'should be able to find the NgModule of a directive' , ( ) => {
186
- const fileName = '/app/parsing-cases .ts' ;
191
+ const fileName = '/app/app.component .ts' ;
187
192
mockHost . override ( fileName , `
188
193
import {Directive} from '@angular/core';
189
194
190
195
@Directive({
191
196
selector: '[string-model]',
192
197
})
193
- export class «StringModel » {}` ) ;
194
- const marker = mockHost . getReferenceMarkerFor ( fileName , 'StringModel ' ) ;
198
+ export class «AppComponent » {}` ) ;
199
+ const marker = mockHost . getReferenceMarkerFor ( fileName , 'AppComponent ' ) ;
195
200
const quickInfo = ngLS . getHoverAt ( fileName , marker . start ) ;
196
201
expect ( quickInfo ) . toBeTruthy ( ) ;
197
202
const { textSpan, displayParts} = quickInfo ! ;
198
203
expect ( textSpan ) . toEqual ( marker ) ;
199
- expect ( toText ( displayParts ) ) . toBe ( '(directive) AppModule.StringModel : class' ) ;
204
+ expect ( toText ( displayParts ) ) . toBe ( '(directive) AppModule.AppComponent : class' ) ;
200
205
} ) ;
201
206
} ) ;
202
207
0 commit comments