I'm trying to get VSTS to run my Mocha unit tests, similar to how I've got them running in VS 2017.
I'm installed the Node JS Tools for Visual Studio and VS Test Explorer (after a restart) picks up the tests, and runs them.
But I can't get a VSTS build task to run them ???
Tried going through the notes on NTVS about running tests in VSTS but no joy getting it to work.
Moved onto the section about troubleshooting, and seeing if I can run the tests using my local vstest.console.exe
...
So far trying to run vstest ...
- Error: The imported project
"C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0\Node.js Tools\Microsoft.NodejsTools.targets"
was not found - quick fix ... added a copy of directory ...
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Node.js Tools
... to ...C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0
- Error: The imported project
"C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets"
was not found - quick fix ... added a copy of directory ...
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets
... to ...C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0
- Error: Could not find a part of the path
C:\Repos\smc\BasicAzureExpress\BasicAzureExpress\ntvs\TestFrameworks
quick fix
... amend .nsproj to VS 2017 ...<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.0</VisualStudioVersion>
and a directory\TestFrameworks
under\ntvs
... and then have the error ... Error: Missing generic test framework
So I'm left puzzled as to why VS 2017 can run the tests, but vstest.console.exe
won't