({
templateOverride,
expectedSpanText,
expectedDisplayString,
}: {
templateOverride: string;
expectedSpanText: string;
expectedDisplayString: string;
})
| 1267 | }); |
| 1268 | |
| 1269 | function expectQuickInfo({ |
| 1270 | templateOverride, |
| 1271 | expectedSpanText, |
| 1272 | expectedDisplayString, |
| 1273 | }: { |
| 1274 | templateOverride: string; |
| 1275 | expectedSpanText: string; |
| 1276 | expectedDisplayString: string; |
| 1277 | }): ts.QuickInfo { |
| 1278 | const text = templateOverride.replace('¦', ''); |
| 1279 | const template = project.openFile('app.html'); |
| 1280 | template.contents = text; |
| 1281 | env.expectNoSourceDiagnostics(); |
| 1282 | |
| 1283 | template.moveCursorToText(templateOverride); |
| 1284 | const quickInfo = template.getQuickInfoAtPosition(); |
| 1285 | expect(quickInfo).toBeTruthy(); |
| 1286 | const {textSpan, displayParts} = quickInfo!; |
| 1287 | expect(text.substring(textSpan.start, textSpan.start + textSpan.length)).toEqual( |
| 1288 | expectedSpanText, |
| 1289 | ); |
| 1290 | expect(toText(displayParts)).toEqual(expectedDisplayString); |
| 1291 | return quickInfo!; |
| 1292 | } |
| 1293 | }); |
| 1294 | |
| 1295 | function toText(displayParts?: ts.SymbolDisplayPart[]): string { |
no test coverage detected
searching dependent graphs…