I use Chutzpah to run Jasmine tests. I added the Chutzpah DLL to the solution and updated the assembly to run * .js tests.
The structure of the project is as follows:
MyApp.Web Scripts App Home DateControl.js MyApp.Web.Tests Scripts Jasmine lib Chutzpah (dlls) Spec App Home DateControlSpecs.js
The Jasmine test file uses a link tag to link to the file being verified
Jasmine tests run, however I get the following error:
ReferenceError: Can't find variable: dateControl in file
dateControl - the checked object. If I copy the testing code into a Jasmine test file, then the tests will pass. Jasmine tests with a reference tag pass using the Chutzpah test adapter in Test Explorer in Visual Studio 2013.
I have no idea why this is not working.
Update
@jessehouwing's answer pointed the way for me.
The build folder on the build server has the following structure
bin _PublishedWebsites SRC
Jasmine scripts and libraries are copied to bin, and test script files are copied to both the src directory and the _publishedwebsite directory.
I am looking for a convenient solution, so future developers do not need to know that they need to associate any new scripts with a test project.
tfs jasmine tfs2012 chutzpah
skyfoot
source share