mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-15 16:53:31 -06:00
Merge pull request #32789 from amcasey/FileNotFoundError
Correct string template
This commit is contained in:
commit
816e7b0567
@ -713,7 +713,7 @@ namespace ts.server {
|
||||
|
||||
|
||||
if (err.ProgramFiles) {
|
||||
msg += `\n\nProgram files: {JSON.stringify(error.ProgramFiles}}\n`;
|
||||
msg += `\n\nProgram files: ${JSON.stringify(err.ProgramFiles)}\n`;
|
||||
msg += `\n\nProjects::\n`;
|
||||
let counter = 0;
|
||||
const addProjectInfo = (project: Project) => {
|
||||
|
||||
@ -1158,7 +1158,7 @@ namespace ts {
|
||||
function getValidSourceFile(fileName: string): SourceFile {
|
||||
const sourceFile = program.getSourceFile(fileName);
|
||||
if (!sourceFile) {
|
||||
const error: Error & PossibleProgramFileInfo = new Error(`Could not find sourceFile: '${fileName}'.`);
|
||||
const error: Error & PossibleProgramFileInfo = new Error(`Could not find source file: '${fileName}'.`);
|
||||
|
||||
// We've been having trouble debugging this, so attach sidecar data for the tsserver log.
|
||||
// See https://github.com/microsoft/TypeScript/issues/30180.
|
||||
|
||||
@ -139,7 +139,7 @@ namespace ts.projectSystem {
|
||||
assert.isTrue(false, `should not find file '${imported.path}'`);
|
||||
}
|
||||
catch (e) {
|
||||
assert.isTrue(e.message.indexOf(`Could not find sourceFile: '${imported.path}'.`) === 0, `Actual: ${e.message}`);
|
||||
assert.isTrue(e.message.indexOf(`Could not find source file: '${imported.path}'.`) === 0, `Actual: ${e.message}`);
|
||||
}
|
||||
const f2Lookups = getLocationsForModuleLookup("f2");
|
||||
callsTrackingHost.verifyCalledOnEachEntryNTimes(CalledMapsWithSingleArg.fileExists, f2Lookups, 1);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user