Revert "test(compiler-cli): ensure reflection tests are not brittle to case-sensitivity (#36968)" (#37003)

This reverts commit dcf1dcb757.

The changes to the case-sensitivity handling in #36968 caused multiple
projects to fail to build. See #36992, #36993 and #37000.

The issue is related to the logical path handling. But it is felt that
it is safer to revert the entire PR and then to investigate further.

PR Close #37003
This commit is contained in:
Pete Bacon Darwin
2020-05-08 13:33:47 +01:00
committed by Alex Rickabaugh
parent d4a14697ec
commit be06a44861

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
import * as ts from 'typescript'; import * as ts from 'typescript';
import {absoluteFrom, getSourceFileOrError} from '../../file_system'; import {absoluteFrom} from '../../file_system';
import {runInEachFileSystem} from '../../file_system/testing'; import {runInEachFileSystem} from '../../file_system/testing';
import {getDeclaration, makeProgram} from '../../testing'; import {getDeclaration, makeProgram} from '../../testing';
import {CtorParameter} from '../src/host'; import {CtorParameter} from '../src/host';
@ -329,8 +329,8 @@ runInEachFileSystem(() => {
} else if (directTargetDecl === null) { } else if (directTargetDecl === null) {
return fail('No declaration found for DirectTarget'); return fail('No declaration found for DirectTarget');
} }
expect(targetDecl.node!.getSourceFile()) expect(targetDecl.node!.getSourceFile().fileName)
.toBe(getSourceFileOrError(program, _('/node_modules/absolute/index.ts'))); .toBe(_('/node_modules/absolute/index.ts'));
expect(ts.isClassDeclaration(targetDecl.node!)).toBe(true); expect(ts.isClassDeclaration(targetDecl.node!)).toBe(true);
expect(directTargetDecl.viaModule).toBe('absolute'); expect(directTargetDecl.viaModule).toBe('absolute');
expect(directTargetDecl.node).toBe(targetDecl.node); expect(directTargetDecl.node).toBe(targetDecl.node);