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

Edited Issue: assert.throws does not fail in Test Explorer [1390]

$
0
0
Hi,

NTVS Version: Sep dev build.
VS Version: 2013 Ultimate Update 3 RTM.

To repro

* Add the following test case.

```TypeScript
import assert = require("assert");

export function test() {

assert.throws(() => { }, 'This should fail but doesn\'t');
assert.throws(() => { }, Error, 'This should also fail but doesn\'t');
assert.throws(() => { throw new Error("fff"); }, 'This passes but there is an error message in the console');
}
```

* Expected: The first two tests should fail and the last should pass.
* Actual: The test explorer shows green when each test is run (after commenting out the others).

Console output:

```
Test Name: test
Test Outcome: Passed
Result StandardOutput: NTVS_ERROR:TestFramework (ExportRunner) threw an exception processing (test), AssertionError: Missing expected exception. This should fail but doesn't
```


Viewing all articles
Browse latest Browse all 4630

Trending Articles



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