Running Jasmine tests in Typescript, with Chutzpah
<p>I am trying to figure out how typescript-jasmine-chutzpah combination will finally test my typescript code. So I have a sample project (shown in the picture).</p>

<p><a href="https://i.stack.imgur.com/hYUe6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hYUe6.png" alt="enter image description here"></a></p>

<p>I have an app.ts file with the following content</p>

<pre><code>class Calculator {
    add = function(x:number, y:number) {
        return x + y;
    }
}
</code></pre>

<p>and the test file appTest.ts</p>

<pre><code>/// &lt;reference path="../typings/jasmine/jasmine.d.ts" /&gt;
/// &lt;reference path="../../app.ts" /&gt;

/// &lt;chutzpah_reference path="../jasmine/jasmine.js" /&gt;
/// &lt;chutzpah_reference path="../../app.js" /&gt;

describe("Test Calc", function () {

    it("add function", function () {
        var calc = new Calculator(),
            res = calc.add(4, 7);
        expect(res).toBe(11);
    });
});
</code></pre>

<p>If I run tests on testApp.ts the output will be "0 passed, 0 failed, 0 total (chutzpah)." but if I run the compiled testApp.js it seems to work fine "1 passed, 0 failed, 1 total (chutzpah)."</p>

<p>1) Why the tests in .ts file are not found?
2) Should I test my typescript code writing code in Typescript or directly with JavaScript?</p>

<p>Can someone help me figure out this simple test set up and make it work?
Notice that I don't use chutzpah.json at the moment.</p>