I am getting the following error when running unit tests using Chutzpah, Jasmine and Typescript in VS2013: "ReferenceError: ModuleName is not defined at null."
My code looks like this:
module ModuleName {
export class MyVm {
//more code here
}
}
My test (in a file named Tests.ts) looks like this:
/// <reference path="../Scripts/typings/jasmine/jasmine.d.ts" />
/// <reference path="../../website/viewmodels/MyVm.ts" />
describe("VmTests",() => {
it("MyVm_Constructor_PopulatesValues", () => {
var vm = new ModuleName.MyVm();
expect(vm).not.toBeNull();
}
}
The code compiles, the javascript looks fine (almost identical in fact). But when I run the unit test I get the exception above. I've been googling for the last day and a half on this without success. Could really use some suggestions.
Aucun commentaire:
Enregistrer un commentaire