@@ -1236,20 +1236,18 @@ Actual: ${stringify(fullActual)}`);
1236
1236
return this . languageService . findReferences ( this . activeFile . fileName , this . currentCaretPosition ) ;
1237
1237
}
1238
1238
1239
- public getSyntacticDiagnostics ( expected : string ) {
1239
+ public getSyntacticDiagnostics ( expected : ReadonlyArray < ts . RealizedDiagnostic > ) {
1240
1240
const diagnostics = this . languageService . getSyntacticDiagnostics ( this . activeFile . fileName ) ;
1241
1241
this . testDiagnostics ( expected , diagnostics ) ;
1242
1242
}
1243
1243
1244
- public getSemanticDiagnostics ( expected : string ) {
1244
+ public getSemanticDiagnostics ( expected : ReadonlyArray < ts . RealizedDiagnostic > ) {
1245
1245
const diagnostics = this . languageService . getSemanticDiagnostics ( this . activeFile . fileName ) ;
1246
1246
this . testDiagnostics ( expected , diagnostics ) ;
1247
1247
}
1248
1248
1249
- private testDiagnostics ( expected : string , diagnostics : ReadonlyArray < ts . Diagnostic > ) {
1250
- const realized = ts . realizeDiagnostics ( diagnostics , "\r\n" ) ;
1251
- const actual = stringify ( realized ) ;
1252
- assert . equal ( actual , expected ) ;
1249
+ private testDiagnostics ( expected : ReadonlyArray < ts . RealizedDiagnostic > , diagnostics : ReadonlyArray < ts . Diagnostic > ) {
1250
+ assert . deepEqual ( ts . realizeDiagnostics ( diagnostics , ts . newLineCharacter ) , expected ) ;
1253
1251
}
1254
1252
1255
1253
public verifyQuickInfoAt ( markerName : string , expectedText : string , expectedDocumentation ?: string ) {
@@ -4321,11 +4319,11 @@ namespace FourSlashInterface {
4321
4319
this . state . verifyQuickInfoDisplayParts ( kind , kindModifiers , textSpan , displayParts , documentation , tags ) ;
4322
4320
}
4323
4321
4324
- public getSyntacticDiagnostics ( expected : string ) {
4322
+ public getSyntacticDiagnostics ( expected : ReadonlyArray < ts . RealizedDiagnostic > ) {
4325
4323
this . state . getSyntacticDiagnostics ( expected ) ;
4326
4324
}
4327
4325
4328
- public getSemanticDiagnostics ( expected : string ) {
4326
+ public getSemanticDiagnostics ( expected : ReadonlyArray < ts . RealizedDiagnostic > ) {
4329
4327
this . state . getSemanticDiagnostics ( expected ) ;
4330
4328
}
4331
4329
0 commit comments