This project is read-only.

Cannot run generated unit test

Aug 29, 2014 at 2:28 PM
I have created new NTVS project and added new Mocha JS unit test from template:
var assert = require('assert');

describe('Test Suite 1', function() {
    it('Test 1', function() {
        assert.ok(true, "This shouldn't fail");

    it('Test 2', function() {
        assert.ok(1 === 1, "This shouldn't fail");
        assert.ok(false, "This should fail");
Run it from VS2013. Jasmine test runner was launched in a browser with obvious error: "Uncaught ReferenceError: require is not defined". Indeed browser knows nothing about require().
So it doesn't work out of the box. How it is supposed to be run?
Aug 29, 2014 at 5:53 PM
You run it from Test Explorer (Test->Windows->Test Explorer).

See the documentation for the feature here:
Aug 30, 2014 at 10:58 AM
Oh, thank you. I didn't realize that running tests from test explorer and from unit test sessions leads to different behavior.