I'm trying to run the most basic of TypeScript tests using Jasmine and Chutzpah and I just can't get it to work. Here is the source file:
class Simple {
public easyTest() {
retu 5;
}
}
Here is the spec:
/// <reference path="../../../scripts/typings/jasmine/jasmine.d.ts" />
/// <reference path="../../../src/typescript/classSimple.ts" />
describe("Simple Calculations", () => {
it("should retu true", () => {
var simpl = new Simple();
expect(simpl.easyTest()).toBe(5);
});
});
Here is my chutzpah.json file:
{
"RootReferencePathMode": "SettingsFileDirectory",
"Framework": "jasmine",
"Compile": {
"Mode": "Exteal",
"Extensions": [ ".ts" ],
"ExtensionsWithNoOutput": [ ".d.ts" ]
},
"References": [
{ "Path": "../../../src/typescript/classSimple.ts" }
],
"Tests": [
{ "Path": "simpleSpec.ts" }
],
"EnableTracing": true
}
Here is the folder structure
TestProject.sln
-src
--typescript
---classSimple.ts
-tests
--jasmine
---typescript
----chutzpah.json
----simpleSpec.ts
This VS.NET project is set to compile TypeScript upon save and I'm physically looking at the transpiled JavaScript output: classSimple.js in the exact same directory next to classSimple.ts. Yet when I run the spec using Chutzpah I get the following:
Message:Chutzpah run started in mode Execution with parallelism set to 4 Message:Building test context for C:devTestProjecttestsjasminetypescriptsimpleSpec.ts Message:Building test context for 'C:devTestProjecttestsjasminetypescriptsimpleSpec.ts' Message:Test file c:devTestProjecttestsjasminetypescriptsimplespec.ts matched test file path from settings file Message:Investigating reference file path '../../../src/typescript/classSimple.ts' Message:Added file 'C:devTestProjectsrctypescriptclassSimple.ts' to referenced files. Local: True, IncludeInTestHaess: True Message:Processing referenced file 'C:devTestProjectsrctypescriptclassSimple.ts' for expanded references Message:Added framework dependency 'C:UsersmyselfAppDataLocalMicrosoftVisualStudio14.0Extensionsmfv4e3ra.luvTestFilesjasminev2jasmine_favicon.png' to referenced files Message:Added framework dependency 'C:UsersmyselfAppDataLocalMicrosoftVisualStudio14.0Extensionsmfv4e3ra.luvTestFilesjasminev2boot.js' to referenced files Message:Added framework dependency 'C:UsersmyselfAppDataLocalMicrosoftVisualStudio14.0Extensionsmfv4e3ra.luvTestFilesjasminev2jasmine-html.js' to referenced files Message:Added framework dependency 'C:UsersmyselfAppDataLocalMicrosoftVisualStudio14.0Extensionsmfv4e3ra.luvTestFilesjasminev2jasmine.js' to referenced files Message:Added framework dependency 'C:UsersmyselfAppDataLocalMicrosoftVisualStudio14.0Extensionsmfv4e3ra.luvTestFilesjasminev2jasmine.css' to referenced files Message:Added framework dependency 'C:UsersmyselfAppDataLocalMicrosoftVisualStudio14.0Extensionsmfv4e3ra.luvTestFileschutzpah_boot.js' to referenced files Message:Finished building test context for C:devTestProjecttestsjasminetypescriptsimpleSpec.ts Error: 0 : Time:22:47:48.6888513; Thread:23; Message:Can't find location for generated path on C:devTestProjectsrctypescriptclassSimple.ts Waing: 0 : Time:22:47:48.6978503; Thread:23; Message:Chutzpah determined generated .js files are missing but the compile mode is Exteal so Chutzpah can't compile them. Test results may be wrong. Information: 0 : Time:22:47:48.7038522; Thread:23; Message:Found generated path for C:devTestProjecttestsjasminetypescriptsimpleSpec.ts at c:devTestProjecttestsjasminetypescriptsimpleSpec.js Error: 0 : Time:22:47:48.7088508; Thread:23; Message:Couldn't find generated path for C:devTestProjectsrctypescriptclassSimple.ts at
And that's it - it just cuts off on the end and nothing happens. The thing is, I see the .js files exactly in the location stated within the trace above, but Chutzpah is claiming Couldn't find generated path for...
This is as simple as it gets for unit testing. I know the tests work independently of the .ts files because if I run just the .js files the tests pass.
What am I doing incorrectly?
