I'm not sure why it appeared that the angular reference was missing, but playing with the Chutzpah console as suggested by Matthew Manela made me realize that a lot of other references where missing for the test to complete successfully.
In the end, I ended up bundling all my references into a file called _references.js
with the following content:
/// <reference path="jquery-1.9.1.js" />
/// <reference path="jquery-ui-1.8.20.js" />
/// <reference path="jquery.validate.js" />
/// <reference path="jquery.validate.unobtrusive.js" />
/// <reference path="knockout-2.1.0.debug.js" />
/// <reference path="modernizr-2.5.3.js" />
/// <reference path="angular.js" />
/// <reference path="jasmine/jasmine.js" />
/// <reference path="angular-mocks.js" />
/// <reference path="angular-route.js" />
/// <reference path="../Application/src/common/services/" />
/// <reference path="../Application/src/common/views/" />
/// <reference path="../Application/src/common/app.js" />
In my test I include the following reference:
/// <reference path="../../../../../Scripts/_references.js" />
The only remaining problem is that I have to figure out how many levels of nesting each test file has. My assumption was that I could put the following chutzpah.json
file in my project root:
{
"Framework": "jasmine",
"RootReferencePathMode":"SettingsFileDirectory"
}
and then always use the reference:
/// <reference path="/Scripts/_references.js" />
This does not help, but maybe I'm misunderstanding how this is supposed to work.