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

Commented Unassigned: TS Unit Tests: Error in 'require' statement caused all unit tests in file to disappear from Explorer [792]

$
0
0
Steps to reproduce:

0. Create a new TypeScript project (if you don't have one).
1. Add a new Unit Test JS file.
2. Verify "Test 1" and "Test 2" show up in Test Explorer.
3. Change "var assert = require('assert');" to "var assert = require('.assert');"
4. Wait a bit, and "Test 1" and "Test 2" disappear. (In fact the entire "UnitTest1" class disappears.)

The problem is there is no indication what the issue is - no red squiggly line, no build errors, nothing. Selecting "Run Tests" by right-clicking in the source file builds the project but then seems to do nothing. I couldn't find any indication what the error was anywhere.
Comments: That works. I understand why the tests disappear, I was just looking for some indication as to why :) As a first step it might be good to put that information in the "Tests" output window. Right now it just says that it parsed the file and discovered 0 testcases.

Viewing all articles
Browse latest Browse all 4630

Trending Articles



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