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: we can probably make the red squiggles happen, but the tests are still going to disappear. To detect the tests in the file we actually need to run the file. When running this we get an error back: module.js:340 throw err; ^ Error: Cannot find module '.assert' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.<anonymous> (C:\Source\test.ts:1:73) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) So we should be parsing stderr and looking for stack traces and then wire that up to the error list and squiggle the associated line.
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: we can probably make the red squiggles happen, but the tests are still going to disappear. To detect the tests in the file we actually need to run the file. When running this we get an error back: module.js:340 throw err; ^ Error: Cannot find module '.assert' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.<anonymous> (C:\Source\test.ts:1:73) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) So we should be parsing stderr and looking for stack traces and then wire that up to the error list and squiggle the associated line.