extract symbol test
This commit is contained in:
parent
df8ff659c5
commit
3825d193f6
10
tests/cases/fourslash/extractSymbolForTriggerReason.ts
Normal file
10
tests/cases/fourslash/extractSymbolForTriggerReason.ts
Normal file
|
@ -0,0 +1,10 @@
|
|||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////function foo() {
|
||||
//// return 1/*a*//*b*/00;
|
||||
////}
|
||||
|
||||
// Only offer refactor for empty span if explicity requested
|
||||
goTo.select("a", "b");
|
||||
verify.not.refactorAvailableForTriggerReason("implicit", "Extract Symbol");
|
||||
verify.refactorAvailableForTriggerReason("invoked", "Extract Symbol", "constant_scope_0");
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
//// var x: /*1a*/{ a?:/*2a*/ number, b?: string/*2b*//*3a*//*3b*/ }/*1b*/ = { };
|
||||
|
||||
// Only offer refactor for cursor position if explicitly requested
|
||||
// Only offer refactor for empty span if explicity requested
|
||||
goTo.select("3a", "3b");
|
||||
verify.refactorNotAvailableForTriggerReason("implicit", "Extract type");
|
||||
|
||||
|
|
Loading…
Reference in a new issue