i try to write unit tests for my Angular 2 App. I use Jasmine, Chutzpah in Visual Studio 2015. When the test dont have any dependencies or requirements then the test works. But when the test have one, then the Test will not be started.
In the output when i try to start the tests i get:
Error: ReferenceError: Can't find variable: require at global code in ...\scripts\_references.js
Error: ReferenceError: Can't find variable: jQuery at global code in ...\scripts\_references.js
The Reference.js looks like:
/// <autosync enabled="true" />
/// <reference path="../gulpfile.js" />
/// <reference path="bootstrap.js" />
/// <reference path="jasmine.js" />
/// <reference path="jasmine/boot.js" />
/// <reference path="jasmine/console.js" />
/// <reference path="jasmine/jasmine.js" />
/// <reference path="jasmine/jasmine-html.js" />
/// <reference path="jasmine-html.js" />
/// <reference path="jasmine-samples/player.js" />
/// <reference path="jasmine-samples/playerspec.js" />
/// <reference path="jasmine-samples/song.js" />
/// <reference path="jasmine-samples/spechelper.js" />
/// <reference path="jquery.validate.js" />
/// <reference path="jquery.validate.unobtrusive.js" />
/// <reference path="jquery-1.10.2.js" />
/// <reference path="modernizr-2.6.2.js" />
/// <reference path="reflect.js" />
/// <reference path="respond.js" />
/// <reference path="ScriptsApp/app.component.spec.js" />
/// <reference path="shim.min.js" />
/// <reference path="system.src.js" />
/// <reference path="systemjs.config.js" />
/// <reference path="zone.js" />
I think there is something wrong in this file or something is missing.