Skip to content

Conversation

mutn3ja
Copy link
Contributor

@mutn3ja mutn3ja commented Sep 9, 2016

Allow users to specify vstest.console.exe path.

  1. Pending unit tests
  2. Did manual testing

@msftclas
Copy link

msftclas commented Sep 9, 2016

Hi @preetsaimutneja, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!


It looks like you're a Microsoft contributor (Preet Mutneja). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

tl.error(tl.loc('VstestNotFound', vsVersion));
defer.resolve(1);
return defer.promise;
if (vstestLocationMethod == "version") {
Copy link

Choose a reason for hiding this comment

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

=== instead of ==
always use toLowercase and compare

Copy link

Choose a reason for hiding this comment

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

split into multiple functions. not more than 10 lines for function

@vimegh
Copy link
Contributor

vimegh commented Sep 9, 2016

Patch no. in task.json needs to be incremented by 1

vstestLocation = path.join(vsCommon, "..\\IDE\\CommonExtensions\\Microsoft\\TestWindow\\vstest.console.exe");
} else if (vstestLocationMethod == "location") {
try {
fs.accessSync(vstestLocation);
Copy link
Contributor

@vimegh vimegh Sep 9, 2016

Choose a reason for hiding this comment

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

Will fs.accessSync throw error if File Doesn't exist? if yes then file not there and access denied will lead to same error message

Copy link

Choose a reason for hiding this comment

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

actually. you should use tl.exists() there is already lib function.

@nigurr
Copy link

nigurr commented Sep 19, 2016

rest looks good

Copy link

@nigurr nigurr left a comment

Choose a reason for hiding this comment

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

Do this change

defer.resolve(1);
return defer.promise;
if (vstestLocationMethod.toLowerCase() === 'version') {
let vsCommon = tl.getVariable("VS" + vsVersion + "0COMNTools");
Copy link

Choose a reason for hiding this comment

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

this should be separate method

@vimegh
Copy link
Contributor

vimegh commented Sep 19, 2016

:shipit:

@vimegh
Copy link
Contributor

vimegh commented Sep 19, 2016

merge the conflicts.

@mutn3ja mutn3ja merged commit 8df4c59 into master Sep 19, 2016
@bryanmacfarlane bryanmacfarlane deleted the users/prmutn/specifylocationnode branch October 20, 2016 02:17
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