fix(compiler-cli): ensure LogicalFileSystem handles case-sensitivity (#36859)

The `LogicalFileSystem` was not taking into account the
case-sensitivity of the file-system when caching logical
file paths.

PR Close #36859
This commit is contained in:
Pete Bacon Darwin
2020-05-06 21:58:45 +01:00
committed by Alex Rickabaugh
parent 0ec0ff3bce
commit 53a8459d5f
7 changed files with 46 additions and 25 deletions

View File

@ -146,7 +146,7 @@ runInEachFileSystem(() => {
}
}
const {program} = makeProgram([
const {program, host} = makeProgram([
{
name: _('/index.ts'),
contents: `export class Foo {}`,
@ -157,7 +157,7 @@ runInEachFileSystem(() => {
}
]);
const checker = program.getTypeChecker();
const logicalFs = new LogicalFileSystem([_('/')]);
const logicalFs = new LogicalFileSystem([_('/')], host);
const strategy = new LogicalProjectStrategy(new TestHost(checker), logicalFs);
const decl = getDeclaration(program, _('/index.ts'), 'Foo', ts.isClassDeclaration);
const context = program.getSourceFile(_('/context.ts'))!;