@@ -2108,7 +2108,7 @@ namespace FourSlash {
2108
2108
* Because codefixes are only applied on the working file, it is unsafe
2109
2109
* to apply this more than once (consider a refactoring across files).
2110
2110
*/
2111
- public verifyRangeAfterCodeFix ( expectedText : string , errorCode ?: number ) {
2111
+ public verifyRangeAfterCodeFix ( expectedText : string , errorCode ?: number , includeWhiteSpace ?: boolean ) {
2112
2112
const ranges = this . getRanges ( ) ;
2113
2113
if ( ranges . length !== 1 ) {
2114
2114
this . raiseError ( "Exactly one range should be specified in the testfile." ) ;
@@ -2120,7 +2120,11 @@ namespace FourSlash {
2120
2120
2121
2121
const actualText = this . rangeText ( ranges [ 0 ] ) ;
2122
2122
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 ) {
2124
2128
this . raiseError ( `Actual text doesn't match expected text. Actual:\n'${ actualText } '\nExpected:\n'${ expectedText } '` ) ;
2125
2129
}
2126
2130
}
@@ -3509,8 +3513,8 @@ namespace FourSlashInterface {
3509
3513
this . DocCommentTemplate ( /*expectedText*/ undefined , /*expectedOffset*/ undefined , /*empty*/ true ) ;
3510
3514
}
3511
3515
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 ) ;
3514
3518
}
3515
3519
3516
3520
public importFixAtPosition ( expectedTextArray : string [ ] , errorCode ?: number ) : void {
0 commit comments