update failing tests

This commit is contained in:
Gabriela Araujo Britto
2019-02-25 10:32:28 -08:00
parent 640424e42c
commit bc3611d1dd
2 changed files with 11 additions and 9 deletions

View File

@@ -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]
});`
});

View File

@@ -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" });`
});