diff --git a/tests/cases/fourslash/formattingOptionsChangeJsx.ts b/tests/cases/fourslash/formattingOptionsChangeJsx.ts index a3c7e28a1ef..067f0b882f2 100644 --- a/tests/cases/fourslash/formattingOptionsChangeJsx.ts +++ b/tests/cases/fourslash/formattingOptionsChangeJsx.ts @@ -1,9 +1,14 @@ /// //@Filename: file.tsx -/////*InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces*/; +/////*InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces1*/; +//// +//// -runTest("InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces", ";", ";"); +runTest("InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces1", ";", ";"); +runTest("InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces2", " { ...this._getButtonProps() }", " {...this._getButtonProps()}"); function runTest(propertyName: string, expectedStringWhenTrue: string, expectedStringWhenFalse: string) { @@ -11,7 +16,7 @@ function runTest(propertyName: string, expectedStringWhenTrue: string, expectedS goTo.marker(propertyName); // Set the option to false first - format.setOption(propertyName, false); + format.setOption(propertyName.slice(0, -1), false); // Format format.document(); @@ -21,7 +26,7 @@ function runTest(propertyName: string, expectedStringWhenTrue: string, expectedS verify.currentLineContentIs(expectedStringWhenFalse); // Set the option to true - format.setOption(propertyName, true); + format.setOption(propertyName.slice(0, -1), true); // Format format.document();