TypeScript/tests/cases/fourslash/extract-method19.ts
2017-08-04 16:10:33 -07:00

23 lines
502 B
TypeScript

/// <reference path='fourslash.ts' />
// New function names should be totally new to the file
//// function fn() {
//// /*a*/console.log("hi");/*b*/
//// }
////
//// function newFunction() { }
goTo.select('a', 'b')
verify.refactorAvailable('Extract Method');
edit.applyRefactor('Extract Method', "scope_0");
verify.currentFileContentIs(`function fn() {
newFunction_1();
function newFunction_1() {
console.log("hi");
}
}
function newFunction() { }`);