update tests formatting

This commit is contained in:
Gabriela Britto
2019-01-29 16:45:52 -08:00
parent 1d94322ea0
commit 050c70a4c0
5 changed files with 10 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
/// <reference path='fourslash.ts' />
////const foo = /*a*/function/*b*/(a: number, b: number) {};
////const foo = /*a*/function/*b*/(a: number, b: number) { };
////foo(1, 2);
goTo.select("a", "b");
@@ -8,6 +8,6 @@ edit.applyRefactor({
refactorName: "Convert to named parameters",
actionName: "Convert to named parameters",
actionDescription: "Convert to named parameters",
newContent: `const foo = function({ a, b }: { a: number; b: number; }) {};
newContent: `const foo = function({ a, b }: { a: number; b: number; }) { };
foo({ a: 1, b: 2 });`
});

View File

@@ -1,6 +1,6 @@
/// <reference path='fourslash.ts' />
////const foo = /*a*/(a: number, b: number)/*b*/ => {};
////const foo = /*a*/(a: number, b: number)/*b*/ => { };
////foo(1, 2);
goTo.select("a", "b");
@@ -8,6 +8,6 @@ edit.applyRefactor({
refactorName: "Convert to named parameters",
actionName: "Convert to named parameters",
actionDescription: "Convert to named parameters",
newContent: `const foo = ({ a, b }: { a: number; b: number; }) => {};
newContent: `const foo = ({ a, b }: { a: number; b: number; }) => { };
foo({ a: 1, b: 2 });`
});

View File

@@ -1,7 +1,7 @@
/// <reference path='fourslash.ts' />
////const c = class {
//// constructor(/*a*/a: number, b = { x: 1 }/*b*/) {}
//// constructor(/*a*/a: number, b = { x: 1 }/*b*/) { }
////}
////var x = new c(2);
@@ -11,7 +11,7 @@ edit.applyRefactor({
actionName: "Convert to named parameters",
actionDescription: "Convert to named parameters",
newContent: `const c = class {
constructor({ a, b = { x: 1 } }: { a: number; b?: { x: number; }; }) {}
constructor({ a, b = { x: 1 } }: { a: number; b?: { x: number; }; }) { }
}
var x = new c({ a: 2 });`
});

View File

@@ -11,7 +11,7 @@ edit.applyRefactor({
actionName: "Convert to named parameters",
actionDescription: "Convert to named parameters",
newContent: `function foo<T, S>({ t, s }: { t: T; s: S; }) {
return s;
return s;
}
foo({ t: "a", s: "b" });`
});

View File

@@ -7,6 +7,7 @@
////}
////var foo = new Foo();
////foo['bar']("a", "b");
////foo.bar("a", "b");
goTo.select("a", "b");
edit.applyRefactor({
@@ -19,5 +20,6 @@ edit.applyRefactor({
}
}
var foo = new Foo();
foo['bar']({ t: "a", s: "b" });`
foo['bar']({ t: "a", s: "b" });
foo.bar({ t: "a", s: "b" });`
});