I'm having some bother getting Chutzpah to work with requireJs/jasmine 2.0. This method worked for version 1.3 but now for jasmine version 2.0 chutzpah has stopped picking up the tests. I upgraded chutzpah to 3.1.1 for the jasmine 2.0 support as well. I did have to make a small change to load jasmine from requireJs to make it work but I figured this shouldn't affect chutzpah as it was just loading the html.
Here's the command I run for chutzpah.
chutzpah.console.exe path/to/SpecRunner.html
The console now fails to pick up tests
=== 0 total, 0 failed, took 0.25 seconds ===
But when I run the actual html file it finds the tests
Any help would be greatly appreciated
Instead of the HTML route I've been trying just the chutzpah built in configuration
{ "Framework": "jasmine", "TestHarnessReferenceMode": "AMD", "TestHarnessLocationMode": "SettingsFileAdjacent", "Tests": [ {"Path" : "Specs/example.spec.js"}, ], "References" : [ {"Path" : "../../../Scripts/lib/require/require.js" }, {"Path" : "../../../Scripts/app/app.js" } ] }
This runs however I'm getting an error
Error: Error: Script error for: specs/example.spec Error: Timeout occured when executing test file While Running:C:\path\to\specs\example.spec.js System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Chutzpah.FileProbe.<FindScriptFiles>d__1a.MoveNext() in c:\Dev\chutzpah\Chutzpah\FileProbe.cs:line 159
The path here is definitely correct as i've copied and pasted it into an explorer window just to make sure.
The test is a simple compiled coffeescript file which looks like this
(function() { define([], function() { return describe('==== example test ====', function() { return describe('the test should', function() { return it('showcase toBe', function() { return expect(true).toBe(true); }); }); }); }); }).call(this);
And I'm certain that this works as it's passing in my browser html based equivalent.
This was my final configuration that works with html. I couldn't get it to work with just the config discovering the tests. Hopefully this will be resolved when item 214 is resolved as in the below answer
{ "Framework": "jasmine", "RootReferencePathMode": "SettingsFileDirectory", "TestHarnessReferenceMode": "AMD", "TestHarnessLocationMode": "SettingsFileAdjacent", "Tests": [ { "Path" : "specrunner.html" } ], "References" : [ {"Path" : "../../../Scripts/lib/require/require.js" }, {"Path" : "../../../Scripts/app/app.js" } ] }