Quantcast
Channel: Node.js Tools for Visual Studio
Viewing all articles
Browse latest Browse all 4630

Edited Issue: TypeScript: Unit tests not discovered by Test Explorer [669]

$
0
0
Hi,

__NTVS version__: NTVS Dev 2014-02-07 VS 2013.msi
__VS Version__: Visual Studio 2013 Ultimate.

When unit tests are created in TypeScript the Test Explorer fails to recognise the tests.

To reproduce

1. Right click on the project >> Add >> New Item >> JavaScript UnitTest file >> UnitTest1.js
2. Open up Test Exporer and ensure the tests are visible.
3. Rename the file to UnitTest2.ts.
4. To set the build action, edit the project XML and set `<TypeScriptCompile Include="UnitTest1.ts" />` [see work item #664](https://nodejstools.codeplex.com/workitem/664)
5. Compile the solution, ensuring UnitTest1.js has been produced.
6. Switch over to Test Explorer - the tests are not visible.

To get the tests back, right click on UnitTest1.js and select "Include in project".

However, this workaround is not viable. In the TypeScript world, the JavaScript files are simply treated as output and should not be included in the project.

Please fix the Test Explorer so that it's able to either

(a). Recognise tests in .ts files, or
(b). Look for .js files not included in the project, but found in the output directory.

Thanks.


Viewing all articles
Browse latest Browse all 4630

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>