In stuff.js:
function init() {
return "works"; // just here to ensure we can access this file from the test
}
window.MyNamespace = {};
In my test JS file:
/// <reference path="../../../project1/Shared/sub1/Javascript/stuff.js" />
test("foo test", function () {
equal(init(), "works", "couldn't access source JS file");
ok(window, "couldn't access source JS file");
var ns = window.MyNamespace;
ok(ns, "namespace is bad");
});
I get namespace is bad
when running the above test using Chutzpah Test Adapter. What am I doing wrong? Shouldn't qUnit/Chutzpah have run the code in stuff.js before trying to run the test?