mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 11:24:49 -05:00
Some of the test refactoring and readable baselining (#56075)
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user