diff --git a/tests/cases/fourslash/tsxRename10.ts b/tests/cases/fourslash/tsxRename10.ts deleted file mode 100644 index 091f5aa976..0000000000 --- a/tests/cases/fourslash/tsxRename10.ts +++ /dev/null @@ -1,40 +0,0 @@ -/// - -//@Filename: file.tsx -// @jsx: preserve -// @noLib: true - -//// declare module JSX { -//// interface Element { } -//// interface IntrinsicElements { -//// } -//// interface ElementAttributesProperty { props; } -//// } -//// interface ClickableProps { -//// children?: string; -//// className?: string; -//// } -//// interface ButtonProps extends ClickableProps { -//// onClick(event?: React.MouseEvent): void; -//// } -//// interface LinkProps extends ClickableProps { -//// [|goTo|]: string; -//// } -//// declare function MainButton(buttonProps: ButtonProps): JSX.Element; -//// declare function MainButton(linkProps: LinkProps): JSX.Element; -//// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; -//// let opt = ; -//// let opt = ; -//// let opt = {}} />; -//// let opt = {}} ignore-prop />; -//// let opt = ; -//// let opt = ; -//// let opt = ; - - -let ranges = test.ranges(); -verify.assertHasRanges(ranges); -for (let range of ranges) { - goTo.position(range.start); - verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false); -} \ No newline at end of file diff --git a/tests/cases/fourslash/tsxRename11.ts b/tests/cases/fourslash/tsxRename11.ts deleted file mode 100644 index 97933dd0cc..0000000000 --- a/tests/cases/fourslash/tsxRename11.ts +++ /dev/null @@ -1,39 +0,0 @@ -/// - -//@Filename: file.tsx -// @jsx: preserve -// @noLib: true - -//// declare module JSX { -//// interface Element { } -//// interface IntrinsicElements { -//// } -//// interface ElementAttributesProperty { props; } -//// } -//// interface ClickableProps { -//// children?: string; -//// className?: string; -//// } -//// interface ButtonProps extends ClickableProps { -//// [|onClick|](event?: React.MouseEvent): void; -//// } -//// interface LinkProps extends ClickableProps { -//// goTo: string; -//// } -//// declare function MainButton(buttonProps: ButtonProps): JSX.Element; -//// declare function MainButton(linkProps: LinkProps): JSX.Element; -//// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; -//// let opt = ; -//// let opt = ; -//// let opt = {}} />; -//// let opt = {}} ignore-prop />; -//// let opt = ; -//// let opt = ; - - -let ranges = test.ranges(); -verify.assertHasRanges(ranges); -for (let range of ranges) { - goTo.position(range.start); - verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false); -} \ No newline at end of file diff --git a/tests/cases/fourslash/tsxRename12.ts b/tests/cases/fourslash/tsxRename12.ts deleted file mode 100644 index 30e6b506f4..0000000000 --- a/tests/cases/fourslash/tsxRename12.ts +++ /dev/null @@ -1,39 +0,0 @@ -/// - -//@Filename: file.tsx -// @jsx: preserve -// @noLib: true - -//// declare module JSX { -//// interface Element { } -//// interface IntrinsicElements { -//// } -//// interface ElementAttributesProperty { props; } -//// } -//// interface ClickableProps { -//// children?: string; -//// className?: string; -//// } -//// interface ButtonProps extends ClickableProps { -//// onClick(event?: React.MouseEvent): void; -//// } -//// interface LinkProps extends ClickableProps { -//// goTo: string; -//// } -//// declare function MainButton(buttonProps: ButtonProps): JSX.Element; -//// declare function MainButton(linkProps: LinkProps): JSX.Element; -//// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; -//// let opt = ; -//// let opt = ; -//// let opt = {}} />; -//// let opt = {}} ignore-prop />; -//// let opt = ; -//// let opt = ; - - -let ranges = test.ranges(); -verify.assertHasRanges(ranges); -for (let range of ranges) { - goTo.position(range.start); - verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false); -} \ No newline at end of file diff --git a/tests/cases/fourslash/tsxRename13.ts b/tests/cases/fourslash/tsxRename13.ts deleted file mode 100644 index 02d0fb1b3d..0000000000 --- a/tests/cases/fourslash/tsxRename13.ts +++ /dev/null @@ -1,39 +0,0 @@ -/// - -//@Filename: file.tsx -// @jsx: preserve -// @noLib: true - -//// declare module JSX { -//// interface Element { } -//// interface IntrinsicElements { -//// } -//// interface ElementAttributesProperty { props; } -//// } -//// interface ClickableProps { -//// children?: string; -//// className?: string; -//// } -//// interface ButtonProps extends ClickableProps { -//// onClick(event?: React.MouseEvent): void; -//// } -//// interface LinkProps extends ClickableProps { -//// goTo: string; -//// } -//// declare function MainButton(buttonProps: ButtonProps): JSX.Element; -//// declare function MainButton(linkProps: LinkProps): JSX.Element; -//// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; -//// let opt = ; -//// let opt = ; -//// let opt = {}} />; -//// let opt = {}} [|ignore-prop|] />; -//// let opt = ; -//// let opt = ; - - -let ranges = test.ranges(); -verify.assertHasRanges(ranges); -for (let range of ranges) { - goTo.position(range.start); - verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false); -} \ No newline at end of file diff --git a/tests/cases/fourslash/tsxRename6.ts b/tests/cases/fourslash/tsxRename6.ts index 59bc3f4800..6f999c1276 100644 --- a/tests/cases/fourslash/tsxRename6.ts +++ b/tests/cases/fourslash/tsxRename6.ts @@ -22,9 +22,4 @@ //// let opt3 = <[|Opt|] wrong />; //// let opt4 = <[|Opt|] propx={100} propString="hi" />; -let ranges = test.ranges(); -verify.assertHasRanges(ranges); -for (let range of ranges) { - goTo.position(range.start); - verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false); -} \ No newline at end of file +verify.rangesAreRenameLocations(); diff --git a/tests/cases/fourslash/tsxRename7.ts b/tests/cases/fourslash/tsxRename7.ts index b5d05e49bd..5533db1b4d 100644 --- a/tests/cases/fourslash/tsxRename7.ts +++ b/tests/cases/fourslash/tsxRename7.ts @@ -21,9 +21,4 @@ //// let opt2 = ; //// let opt3 = ; -let ranges = test.ranges(); -verify.assertHasRanges(ranges); -for (let range of ranges) { - goTo.position(range.start); - verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false); -} \ No newline at end of file +verify.rangesAreRenameLocations(); diff --git a/tests/cases/fourslash/tsxRename8.ts b/tests/cases/fourslash/tsxRename8.ts index 48bbff0d88..a75c2833bb 100644 --- a/tests/cases/fourslash/tsxRename8.ts +++ b/tests/cases/fourslash/tsxRename8.ts @@ -23,9 +23,4 @@ //// let opt3 = ; //// let opt4 = ; -let ranges = test.ranges(); -verify.assertHasRanges(ranges); -for (let range of ranges) { - goTo.position(range.start); - verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false); -} \ No newline at end of file +verify.rangesAreRenameLocations(); diff --git a/tests/cases/fourslash/tsxRename9.ts b/tests/cases/fourslash/tsxRename9.ts index 4d132f5eac..b39b009634 100644 --- a/tests/cases/fourslash/tsxRename9.ts +++ b/tests/cases/fourslash/tsxRename9.ts @@ -15,24 +15,19 @@ //// className?: string; //// } //// interface ButtonProps extends ClickableProps { -//// onClick(event?: React.MouseEvent): void; +//// [|onClick|](event?: React.MouseEvent): void; //// } //// interface LinkProps extends ClickableProps { -//// goTo: string; +//// [|goTo|]: string; //// } //// declare function [|MainButton|](buttonProps: ButtonProps): JSX.Element; //// declare function [|MainButton|](linkProps: LinkProps): JSX.Element; //// declare function [|MainButton|](props: ButtonProps | LinkProps): JSX.Element; //// let opt = <[|MainButton|] />; //// let opt = <[|MainButton|] children="chidlren" />; -//// let opt = <[|MainButton|] onClick={()=>{}} />; -//// let opt = <[|MainButton|] onClick={()=>{}} ignore-prop />; -//// let opt = <[|MainButton|] goTo="goTo" />; -//// let opt = <[|MainButton|] wrong />; +//// let opt = <[|MainButton|] [|onClick|]={()=>{}} />; +//// let opt = <[|MainButton|] [|onClick|]={()=>{}} [|ignore-prop|] />; +//// let opt = <[|MainButton|] [|goTo|]="goTo" />; +//// let opt = <[|MainButton|] [|wrong|] />; -let ranges = test.ranges(); -verify.assertHasRanges(ranges); -for (let range of ranges) { - goTo.position(range.start); - verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false); -} \ No newline at end of file +verify.rangesWithSameTextAreRenameLocations();