Some of the test refactoring and readable baselining (#56075)

This commit is contained in:
Sheetal Nandi
2023-10-12 10:39:40 -07:00
committed by GitHub
parent a8546cec3d
commit feeb30dec9
333 changed files with 38004 additions and 24678 deletions

View File

@@ -2640,10 +2640,6 @@ export class AutoImportProviderProject extends Project {
return PackageJsonAutoImportPreference.Off;
}
override getTypeAcquisition(): TypeAcquisition {
return { enable: false };
}
/** @internal */
override getSymlinkCache() {
return this.hostProject.getSymlinkCache();

View File

@@ -323,7 +323,7 @@ export function formatMessage<T extends protocol.Message>(msg: T, logger: Logger
const json = JSON.stringify(msg);
if (verboseLogging) {
logger.info(`${msg.type}:${indent(JSON.stringify(msg, undefined, " "))}`);
logger.info(`${msg.type}:${stringifyIndented(msg)}`);
}
const len = byteLength(json, "utf8");

View File

@@ -110,19 +110,3 @@ export function removeSorted<T>(array: SortedArray<T>, remove: T, compare: Compa
array.splice(removeIndex, 1);
}
}
const indentStr = "\n ";
/** @internal */
export function indent(str: string): string {
return indentStr + str.replace(/\n/g, indentStr);
}
/**
* Put stringified JSON on the next line, indented.
*
* @internal
*/
export function stringifyIndented(json: {}): string {
return indentStr + JSON.stringify(json);
}