@@ -2108,7 +2108,7 @@ namespace FourSlash {
21082108 * Because codefixes are only applied on the working file, it is unsafe
21092109 * to apply this more than once (consider a refactoring across files).
21102110 */
2111- public verifyRangeAfterCodeFix ( expectedText : string , errorCode ?: number ) {
2111+ public verifyRangeAfterCodeFix ( expectedText : string , errorCode ?: number , includeWhiteSpace ?: boolean ) {
21122112 const ranges = this . getRanges ( ) ;
21132113 if ( ranges . length !== 1 ) {
21142114 this . raiseError ( "Exactly one range should be specified in the testfile." ) ;
@@ -2120,7 +2120,11 @@ namespace FourSlash {
21202120
21212121 const actualText = this . rangeText ( ranges [ 0 ] ) ;
21222122
2123- if ( this . removeWhitespace ( actualText ) !== this . removeWhitespace ( expectedText ) ) {
2123+ const result = includeWhiteSpace
2124+ ? actualText === expectedText
2125+ : this . removeWhitespace ( actualText ) === this . removeWhitespace ( expectedText )
2126+
2127+ if ( ! result ) {
21242128 this . raiseError ( `Actual text doesn't match expected text. Actual:\n'${ actualText } '\nExpected:\n'${ expectedText } '` ) ;
21252129 }
21262130 }
@@ -3509,8 +3513,8 @@ namespace FourSlashInterface {
35093513 this . DocCommentTemplate ( /*expectedText*/ undefined , /*expectedOffset*/ undefined , /*empty*/ true ) ;
35103514 }
35113515
3512- public rangeAfterCodeFix ( expectedText : string , errorCode ?: number ) : void {
3513- this . state . verifyRangeAfterCodeFix ( expectedText , errorCode ) ;
3516+ public rangeAfterCodeFix ( expectedText : string , errorCode ?: number , includeWhiteSpace ?: boolean ) : void {
3517+ this . state . verifyRangeAfterCodeFix ( expectedText , errorCode , includeWhiteSpace ) ;
35143518 }
35153519
35163520 public importFixAtPosition ( expectedTextArray : string [ ] , errorCode ?: number ) : void {
0 commit comments