@@ -319,38 +319,6 @@ interface String { charAt: any; }
319319interface Array<T> {}`
320320 } ;
321321
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-
354322 function testConvertToAsyncFunction ( caption : string , text : string , baselineFolder : string , description : DiagnosticMessage , includeLib ?: boolean ) {
355323 const t = getTest ( text ) ;
356324 const selectionRange = t . ranges . get ( "selection" ) ! ;
@@ -389,7 +357,7 @@ interface Array<T> {}`
389357 cancellationToken : { throwIfCancellationRequested : noop , isCancellationRequested : returnFalse } ,
390358 preferences : emptyOptions ,
391359 host : notImplementedHost ,
392- formatContext : formatting . getFormatContext ( formatOptions )
360+ formatContext : formatting . getFormatContext ( testFormatOptions )
393361 } ;
394362
395363 const diagnostics = languageService . getSuggestionDiagnostics ( f . path ) ;
0 commit comments