@@ -319,7 +319,7 @@ interface String { charAt: any; }
319
319
interface Array<T> {}`
320
320
} ;
321
321
322
- function testConvertToAsyncFunction ( caption : string , text : string , baselineFolder : string , description : DiagnosticMessage , includeLib ?: boolean ) {
322
+ function testConvertToAsyncFunction ( caption : string , text : string , baselineFolder : string , diagnosticDescription : DiagnosticMessage , codeFixDescription : DiagnosticMessage , includeLib ?: boolean ) {
323
323
const t = getTest ( text ) ;
324
324
const selectionRange = t . ranges . get ( "selection" ) ! ;
325
325
if ( ! selectionRange ) {
@@ -361,11 +361,11 @@ interface Array<T> {}`
361
361
} ;
362
362
363
363
const diagnostics = languageService . getSuggestionDiagnostics ( f . path ) ;
364
- const diagnostic = find ( diagnostics , diagnostic => diagnostic . messageText === description . message ) ;
364
+ const diagnostic = find ( diagnostics , diagnostic => diagnostic . messageText === diagnosticDescription . message ) ;
365
365
assert . exists ( diagnostic ) ;
366
366
367
367
const actions = codefix . getFixes ( context ) ;
368
- const action = find ( actions , action => action . description === description . message ) ! ;
368
+ const action = find ( actions , action => action . description === codeFixDescription . message ) ! ;
369
369
assert . exists ( action ) ;
370
370
371
371
const data : string [ ] = [ ] ;
@@ -380,7 +380,7 @@ interface Array<T> {}`
380
380
381
381
const diagProgram = makeProgram ( { path, content : newText } , includeLib ) ! ;
382
382
assert . isFalse ( hasSyntacticDiagnostics ( diagProgram ) ) ;
383
- Harness . Baseline . runBaseline ( `${ baselineFolder } /${ caption } ${ extension } ` , data . join ( newLineCharacter ) ) ;
383
+ Harness . Baseline . runBaseline ( `${ baselineFolder } /${ caption } ${ extension } ` , ( ) => data . join ( newLineCharacter ) ) ;
384
384
}
385
385
386
386
function makeProgram ( f : { path : string , content : string } , includeLib ?: boolean ) {
@@ -1182,7 +1182,7 @@ function [#|f|]() {
1182
1182
} ) ;
1183
1183
1184
1184
function _testConvertToAsyncFunction ( caption : string , text : string ) {
1185
- testConvertToAsyncFunction ( caption , text , "convertToAsyncFunction" , Diagnostics . Convert_to_async_function , /*includeLib*/ true ) ;
1185
+ testConvertToAsyncFunction ( caption , text , "convertToAsyncFunction" , Diagnostics . This_may_be_converted_to_an_async_function , Diagnostics . Convert_to_async_function , /*includeLib*/ true ) ;
1186
1186
}
1187
1187
1188
1188
function _testConvertToAsyncFunctionFailed ( caption : string , text : string ) {
0 commit comments