
committed by
Igor Minar

parent
83c1383701
commit
83d207d0a7
@ -22,38 +22,21 @@ describe('Collector', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
host = new Host(FILES, [
|
||||
'/app/app.component.ts',
|
||||
'/app/cases-data.ts',
|
||||
'/app/error-cases.ts',
|
||||
'/promise.ts',
|
||||
'/unsupported-1.ts',
|
||||
'/unsupported-2.ts',
|
||||
'/unsupported-3.ts',
|
||||
'class-arity.ts',
|
||||
'declarations.d.ts',
|
||||
'import-star.ts',
|
||||
'exported-classes.ts',
|
||||
'exported-functions.ts',
|
||||
'exported-enum.ts',
|
||||
'exported-type.ts',
|
||||
'exported-consts.ts',
|
||||
'local-symbol-ref.ts',
|
||||
'local-function-ref.ts',
|
||||
'local-symbol-ref-func.ts',
|
||||
'local-symbol-ref-func-dynamic.ts',
|
||||
'private-enum.ts',
|
||||
're-exports.ts',
|
||||
're-exports-2.ts',
|
||||
'export-as.d.ts',
|
||||
'named-module.d.ts',
|
||||
'static-field-reference.ts',
|
||||
'static-method.ts',
|
||||
'static-method-call.ts',
|
||||
'static-method-with-if.ts',
|
||||
'static-method-with-default.ts',
|
||||
'class-inheritance.ts',
|
||||
'class-inheritance-parent.ts',
|
||||
'class-inheritance-declarations.d.ts',
|
||||
'/app/app.component.ts', '/app/cases-data.ts',
|
||||
'/app/error-cases.ts', '/promise.ts',
|
||||
'/unsupported-1.ts', '/unsupported-2.ts',
|
||||
'/unsupported-3.ts', 'class-arity.ts',
|
||||
'declarations.d.ts', 'import-star.ts',
|
||||
'exported-classes.ts', 'exported-functions.ts',
|
||||
'exported-enum.ts', 'exported-type.ts',
|
||||
'exported-consts.ts', 'local-symbol-ref.ts',
|
||||
'local-function-ref.ts', 'local-symbol-ref-func.ts',
|
||||
'private-enum.ts', 're-exports.ts',
|
||||
're-exports-2.ts', 'export-as.d.ts',
|
||||
'named-module.d.ts', 'static-field-reference.ts',
|
||||
'static-method.ts', 'static-method-call.ts',
|
||||
'static-method-with-if.ts', 'static-method-with-default.ts',
|
||||
'class-inheritance.ts', 'class-inheritance-parent.ts',
|
||||
'interface-reference.ts'
|
||||
]);
|
||||
service = ts.createLanguageService(host, documentRegistry);
|
||||
|
@ -91,7 +91,8 @@ describe('Symbols', () => {
|
||||
});
|
||||
|
||||
it('should be able to resolve any symbol in core global scope', () => {
|
||||
const core = program.getSourceFiles().find(source => source.fileName.endsWith('lib.d.ts'));
|
||||
const core = (program.getSourceFiles() as ts.SourceFile[])
|
||||
.find(source => source.fileName.endsWith('lib.d.ts'));
|
||||
expect(core).toBeDefined();
|
||||
const visit = (node: ts.Node): boolean => {
|
||||
switch (node.kind) {
|
||||
|
@ -161,6 +161,9 @@ export function expectNoDiagnostics(diagnostics: ts.Diagnostic[]) {
|
||||
const {line, character} = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);
|
||||
// tslint:disable-next-line:no-console
|
||||
console.log(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`);
|
||||
} else {
|
||||
// tslint:disable-next-line:no-console
|
||||
console.log(message);
|
||||
}
|
||||
}
|
||||
expect(diagnostics.length).toBe(0);
|
||||
|
Reference in New Issue
Block a user