From 05a6f343f71ae234ccfd72f83050abaf2ee1f0b7 Mon Sep 17 00:00:00 2001 From: Benjamin Lichtman Date: Thu, 28 Dec 2017 13:10:32 -0800 Subject: [PATCH] Update test --- tests/cases/fourslash/formattingOptionsChangeJsx.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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();