Skip to content

Fix acquiring format options for getEditsForRefactor #18848

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

Merged
4 commits merged into from
Oct 2, 2017
Merged

Conversation

ghost
Copy link

@ghost ghost commented Sep 29, 2017

Fixes #18328.
Thanks @sheetalkamat for the help spotting this fix.
Also removed formatOptions from GetEditsForRefactorRequestArgs since that should be sent only once, not once per refactor. (This was added only recently so should be fine to remove before anyone uses it.)

@ghost ghost requested a review from sheetalkamat September 29, 2017 18:07
@sheetalkamat
Copy link
Member

Needs test

@ghost ghost force-pushed the extractMethodFormat branch from 064609b to 52abafb Compare September 29, 2017 19:03
@@ -4245,4 +4245,66 @@ namespace ts.projectSystem {
}
});
});

describe("refactors", () => {
it("abcdefg", () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please describe the text here instead so its easy to figure out when test fails

const response0 = session.executeCommand(command0).response;
assert.deepEqual(response0, /*expected*/ undefined);

const command: server.protocol.GetEditsForRefactorRequest = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using executeCommandSeq instead so you don't need to write the type, sequence etc

@ghost ghost merged commit eefe5c9 into master Oct 2, 2017
@ghost ghost deleted the extractMethodFormat branch October 2, 2017 20:26
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extract function doesn't respect indentation settings
1 participant