I'm seeing an issue where tests that fail in the browser aren't reported at the console.
If I edit samples/basic/qunit/basic.qunit.js and cause a compilation fail by adding the 2nd line below:
1.global failure (1, 0, 1)Rerun1 ms1.'TriggerGlobalFailure' is undefinedSource: file:///D:/scratch/Chutzpah.3.0.1/samples/Basic/QUnit/basic-qunit.js:2
All good :)
However, if I run the same via phantom:
What I hope should happen is that chutzpah considers no tests being run a failure (in a similar way to QUnit failing a test without any assertion).
We run chutzpah via msbuild on a gated-check-in. It seems that if someone changes the code that inadvertently breaks the tests, then our build still succeeds but we can't tell that the tests aren't running any more.
Thanks for any insight!
Cheers, Pete
If I edit samples/basic/qunit/basic.qunit.js and cause a compilation fail by adding the 2nd line below:
/// <reference path="../code.js" />
TriggerGlobalFailure(); // i.e. undefined.
test("A basic test", function () {
...
and then run chutzpah 3.0.1:> chutzpah.console.exe .\samples\Basic\QUnit\basic-qunit.js /openinbrowser
Chutzpah opens the test.html and I see an expected error:1.global failure (1, 0, 1)Rerun1 ms1.'TriggerGlobalFailure' is undefinedSource: file:///D:/scratch/Chutzpah.3.0.1/samples/Basic/QUnit/basic-qunit.js:2
All good :)
However, if I run the same via phantom:
>chutzpah.console.exe .\samples\Basic\QUnit\basic-qunit.js
Chutzpah console test runner (64-bit .NET 4.0.30319.34003)
Copyright (C) 2013 Matthew Manela (http://matthewmanela.com).
chutzpah.dll: Version 3.0.1.0
File: D:\scratch\Chutzpah.3.0.1\samples\Basic\QUnit\basic-qunit.js
0 total, 0 failed, took 0.03 seconds
Tests complete: 0
=== 0 total, 0 failed, took 1.24 seconds ===
I can see that 0 tests were run, which is true, but is that the expected behavior please?What I hope should happen is that chutzpah considers no tests being run a failure (in a similar way to QUnit failing a test without any assertion).
We run chutzpah via msbuild on a gated-check-in. It seems that if someone changes the code that inadvertently breaks the tests, then our build still succeeds but we can't tell that the tests aren't running any more.
Thanks for any insight!
Cheers, Pete