Skip to content
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

quoting default pathToJest #523

Merged

Conversation

connectdotz
Copy link
Collaborator

this is to follow up jest-community/jest-editor-support#21:

with jest-editor-support 27.0.0 now able to pass raw pathToJest to the spawn call, users can embed escape characters or quotes when they customize jest.pathToJest and our generated default jestToPath should do the same in case there is escape sequence in user's path.

related issues:
#342
#360
#426
#489

@coveralls
Copy link

coveralls commented Nov 21, 2019

Pull Request Test Coverage Report for Build 673

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+1.3%) to 90.605%

Totals Coverage Status
Change from base Build 667: 1.3%
Covered Lines: 730
Relevant Lines: 805

💛 - Coveralls

@connectdotz
Copy link
Collaborator Author

@omjadas @stephtr @seanpoulter does any of you have a few minutes to review so we can close this issue and cut a new release soon...

Copy link

@omjadas omjadas left a comment

Choose a reason for hiding this comment

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

looks good, only thing is that the shell option should probably be removed from startRunner in JestProcess.ts

@@ -79,7 +79,8 @@ export function pathToJest({ pathToJest, rootPath }: IPluginResourceSettings) {
return 'npm test --'
}

return getLocalPathForExecutable(rootPath, 'jest') || 'jest' + nodeBinExtension
const p = getLocalPathForExecutable(rootPath, 'jest') || 'jest' + nodeBinExtension
Copy link
Member

Choose a reason for hiding this comment

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

I don't have it in mind, if we always use the shell, do we need nodeBinExtension on Windows?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't have a windows machine to verify, if it worked without, I can remove it... does it matter which shell is used? I could imagine users might want to pass their favor shell in the future...

@stephtr
Copy link
Member

stephtr commented Nov 25, 2019

Beside the shell option it looks good to me.
Sorry by the way for being unresponsive the last few weeks.

granted this is not related to the code change, but since the coverage is complaining, might as well take this opportunity to boost up a zero test covered class.
@connectdotz
Copy link
Collaborator Author

@omjadas thanks for reminding me about the deprecated shell option, it's now fixed.

@stephtr I am glad you are back! I agree we should remove the nodeBinExtension for windows if we could, but would definitely need to test it before committing. Since I didn't have a way to verify this, I think it's best to leave it as it is until maybe you or someone else to submit a separate PR for windows.

@connectdotz
Copy link
Collaborator Author

@stephtr @omjadas is there any other change that should be considered? If not please approve otherwise Github blocks merging.

@stephtr
Copy link
Member

stephtr commented Nov 27, 2019

I agree we should remove the nodeBinExtension for windows if we could, but would definitely need to test it before committing. Since I didn't have a way to verify this, I think it's best to leave it as it is until maybe you or someone else to submit a separate PR for windows.

That's true, especially since we already had a few issues related to that.

@connectdotz connectdotz merged commit 77d19a8 into jest-community:master Nov 27, 2019
@connectdotz connectdotz deleted the quote-default-pathToJest2 branch November 27, 2019 13:32
legend1202 pushed a commit to legend1202/vscode-jest that referenced this pull request Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants