add tests for modifiers
This commit is contained in:
parent
62b9fccb98
commit
c25726e764
|
@ -0,0 +1,17 @@
|
|||
/// <reference path='fourslash.ts' />
|
||||
|
||||
//// export let foo = /*x*/a/*y*/ => {
|
||||
//// let b = 1;
|
||||
//// return a + b;
|
||||
//// };
|
||||
|
||||
goTo.select("x", "y");
|
||||
edit.applyRefactor({
|
||||
refactorName: "Convert arrow function or function expression",
|
||||
actionName: "Convert to named function",
|
||||
actionDescription: "Convert to named function",
|
||||
newContent: `export function foo(a) {
|
||||
let b = 1;
|
||||
return a + b;
|
||||
}`,
|
||||
});
|
|
@ -0,0 +1,15 @@
|
|||
/// <reference path='fourslash.ts' />
|
||||
|
||||
//// export let foo, bar = /*x*/(/*y*/) => 1 + 1;
|
||||
|
||||
goTo.select("x", "y");
|
||||
edit.applyRefactor({
|
||||
refactorName: "Convert arrow function or function expression",
|
||||
actionName: "Convert to named function",
|
||||
actionDescription: "Convert to named function",
|
||||
newContent: `export let foo;
|
||||
export function bar() {
|
||||
return 1 + 1;
|
||||
}
|
||||
`,
|
||||
});
|
Loading…
Reference in a new issue