-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Test for action description of code actions, and simplify description for extracting method to file #18030
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… for extracting method to file
484dc22
to
a7e7388
Compare
src/harness/fourslash.ts
Outdated
this.raiseError(`verifyApplicableRefactorAvailableForRange failed - expected a refactor but found none.`); | ||
} | ||
if (refactors.length > 1) { | ||
this.raiseError(`2 available refactors both have name ${name} and action ${actionName}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using the actual number.
: "anonymous class expression"; | ||
} | ||
else if (isSourceFile(scope)) { | ||
return `file '${scope.fileName}'`; | ||
return "this file"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about "file scope" or "top-level scope"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should be "global scope" for a global and "module scope" for a module? @DanielRosenwasser thoughts?
FYI @RyanCavanaugh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
… for extracting method to file (#18030) * Test for action description of code actions, and simplify description for extracting method to file * Add unit test file missing from tsconfig.json (only affects gulp) and update tests * Use the actual number * Use "module scope" or "global scope" instead of "this file"
… for extracting method to file (#18030) (#18044) * Test for action description of code actions, and simplify description for extracting method to file * Add unit test file missing from tsconfig.json (only affects gulp) and update tests * Use the actual number * Use "module scope" or "global scope" instead of "this file"
Fixes #17998