Skip to content

Commit

Permalink
avoid disableLazyShapeComputation in project reference compile on sav…
Browse files Browse the repository at this point in the history
…e test
  • Loading branch information
sokra committed Mar 10, 2021
1 parent d0b4580 commit 2165ffd
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/testRunner/unittests/tsserver/projectReferenceCompileOnSave.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function fn2() { }
const dependencyConfig: File = {
path: `${dependecyLocation}/tsconfig.json`,
content: JSON.stringify({
compilerOptions: { composite: true, disableLazyShapeComputation: true, declarationDir: "../decls" },
compilerOptions: { composite: true, declarationDir: "../decls" },
compileOnSave: true
})
};
Expand All @@ -29,9 +29,6 @@ fn2();
path: `${usageLocation}/tsconfig.json`,
content: JSON.stringify({
compileOnSave: true,
compilerOptions: {
disableLazyShapeComputation: true
},
references: [{ path: "../dependency" }]
})
};
Expand Down Expand Up @@ -329,10 +326,10 @@ ${appendDts}`
requestArgs: () => ({ file: dependencyTs.path, projectFileName: usageConfig.path }),
skipWithoutProject: !!isDependencyOpen,
initial: () => initialDependencyTs(),
localChangeToDependency: () => initialDependencyTs(/*noUsageFiles*/ true),
localChangeToUsage: () => initialDependencyTs(/*noUsageFiles*/ true),
localChangeToDependency: () => initialDependencyTs(),
localChangeToUsage: () => initialDependencyTs(),
changeToDependency: () => initialDependencyTs(),
changeToUsage: () => initialDependencyTs(/*noUsageFiles*/ true)
changeToUsage: () => initialDependencyTs()
}
];

Expand Down Expand Up @@ -368,15 +365,15 @@ ${appendDts}`
expectedAffectedFiles(dependencyConfig, [dependencyTs])
] :
[
expectedAffectedFiles(usageConfig, []),
expectedAffectedFiles(usageConfig, [usageTs]),
expectedAffectedFiles(dependencyConfig, [dependencyTs])
],
expectedEmit: expectedDependencyEmit(localChange),
expectedEmitOutput: expectedDependencyEmitOutput(localChange)
}),
localChangeToUsage: withProject => initial(withProject, /*noUsageFiles*/ true),
localChangeToUsage: withProject => initial(withProject),
changeToDependency: withProject => initial(withProject, /*noUsageFiles*/ undefined, changeJs, changeDts),
changeToUsage: withProject => initial(withProject, /*noUsageFiles*/ true)
changeToUsage: withProject => initial(withProject)
};

function initial(withProject: boolean, noUsageFiles?: true, appendJs?: string, appendDts?: string): SingleScenarioResult {
Expand Down

0 comments on commit 2165ffd

Please sign in to comment.