diff --git a/tests/cases/fourslash/refactorConvertToNamedParameters_callComments2.ts b/tests/cases/fourslash/refactorConvertToNamedParameters_callComments2.ts index 37d4e945a2c..96a56d7024d 100644 --- a/tests/cases/fourslash/refactorConvertToNamedParameters_callComments2.ts +++ b/tests/cases/fourslash/refactorConvertToNamedParameters_callComments2.ts @@ -14,6 +14,7 @@ //// 4); goTo.select("a", "b"); +/* The expected content is currently wrong. The new argument object has the wrong formatting. */ edit.applyRefactor({ refactorName: "Convert to named parameters", actionName: "Convert to named parameters", @@ -22,14 +23,12 @@ edit.applyRefactor({ return a + b; } foo( - { - /**a*/ - a: 1, - /**c*/ - b: 2, - rest: [ + { /**a*/ + a: 1, /**c*/ + b: 2, rest: [ /**e*/ 3, /**g*/ - 4]});` + 4] + });` }); \ No newline at end of file diff --git a/tests/cases/fourslash/refactorConvertToNamedParameters_inheritedConstructor.ts b/tests/cases/fourslash/refactorConvertToNamedParameters_inheritedConstructor.ts index 743fc7fadb4..bde7839a60e 100644 --- a/tests/cases/fourslash/refactorConvertToNamedParameters_inheritedConstructor.ts +++ b/tests/cases/fourslash/refactorConvertToNamedParameters_inheritedConstructor.ts @@ -8,6 +8,9 @@ ////var foo = new Foo("c", "d"); goTo.select("a", "b"); +/* The expected new content is currently wrong. + `new Bar("a", "b")` should be modified by the refactor to be `new Bar({ t: "a", s: "b" })` +*/ edit.applyRefactor({ refactorName: "Convert to named parameters", actionName: "Convert to named parameters", @@ -16,6 +19,6 @@ edit.applyRefactor({ constructor({ t, s }: { t: string; s: string; }) { } } class Bar extends Foo { } -var bar = new Bar({ t: "a", s: "b" }); -var foo = new Foo({ t: "c", s: "d" })` +var bar = new Bar("a", "b"); +var foo = new Foo({ t: "c", s: "d" });` }); \ No newline at end of file