mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
Use baselines for quick info tests to ease updates
This commit is contained in:
@@ -1294,6 +1294,22 @@ namespace FourSlash {
|
||||
});
|
||||
}
|
||||
|
||||
public baselineQuickInfo() {
|
||||
let baselineFile = this.testData.globalOptions[metadataOptionNames.baselineFile];
|
||||
if (!baselineFile) {
|
||||
baselineFile = ts.getBaseFileName(this.activeFile.fileName).replace(".ts", ".baseline");
|
||||
}
|
||||
|
||||
Harness.Baseline.runBaseline(
|
||||
baselineFile,
|
||||
() => stringify(
|
||||
this.testData.markers.map(marker => ({
|
||||
marker: marker,
|
||||
quickInfo: this.languageService.getQuickInfoAtPosition(marker.fileName, marker.position)
|
||||
}))
|
||||
));
|
||||
}
|
||||
|
||||
public printBreakpointLocation(pos: number) {
|
||||
Harness.IO.log("\n**Pos: " + pos + " " + this.spanInfoToString(pos, this.getBreakpointStatementLocation(pos), " "));
|
||||
}
|
||||
@@ -3103,6 +3119,10 @@ namespace FourSlashInterface {
|
||||
this.state.baselineGetEmitOutput();
|
||||
}
|
||||
|
||||
public baselineQuickInfo() {
|
||||
this.state.baselineQuickInfo();
|
||||
}
|
||||
|
||||
public nameOrDottedNameSpanTextIs(text: string) {
|
||||
this.state.verifyCurrentNameOrDottedNameSpanText(text);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user