@@ -319,38 +319,6 @@ interface String { charAt: any; }
319
319
interface Array<T> {}`
320
320
} ;
321
321
322
- const newLineCharacter = "\n" ;
323
- const formatOptions : FormatCodeSettings = {
324
- indentSize : 4 ,
325
- tabSize : 4 ,
326
- newLineCharacter,
327
- convertTabsToSpaces : true ,
328
- indentStyle : IndentStyle . Smart ,
329
- insertSpaceAfterConstructor : false ,
330
- insertSpaceAfterCommaDelimiter : true ,
331
- insertSpaceAfterSemicolonInForStatements : true ,
332
- insertSpaceBeforeAndAfterBinaryOperators : true ,
333
- insertSpaceAfterKeywordsInControlFlowStatements : true ,
334
- insertSpaceAfterFunctionKeywordForAnonymousFunctions : false ,
335
- insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis : false ,
336
- insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets : false ,
337
- insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces : true ,
338
- insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces : false ,
339
- insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces : false ,
340
- insertSpaceBeforeFunctionParenthesis : false ,
341
- placeOpenBraceOnNewLineForFunctions : false ,
342
- placeOpenBraceOnNewLineForControlBlocks : false ,
343
- } ;
344
-
345
- const notImplementedHost : LanguageServiceHost = {
346
- getCompilationSettings : notImplemented ,
347
- getScriptFileNames : notImplemented ,
348
- getScriptVersion : notImplemented ,
349
- getScriptSnapshot : notImplemented ,
350
- getDefaultLibFileName : notImplemented ,
351
- getCurrentDirectory : notImplemented ,
352
- } ;
353
-
354
322
function testConvertToAsyncFunction ( caption : string , text : string , baselineFolder : string , description : DiagnosticMessage , includeLib ?: boolean ) {
355
323
const t = getTest ( text ) ;
356
324
const selectionRange = t . ranges . get ( "selection" ) ! ;
@@ -389,7 +357,7 @@ interface Array<T> {}`
389
357
cancellationToken : { throwIfCancellationRequested : noop , isCancellationRequested : returnFalse } ,
390
358
preferences : emptyOptions ,
391
359
host : notImplementedHost ,
392
- formatContext : formatting . getFormatContext ( formatOptions )
360
+ formatContext : formatting . getFormatContext ( testFormatOptions )
393
361
} ;
394
362
395
363
const diagnostics = languageService . getSuggestionDiagnostics ( f . path ) ;
0 commit comments