Now you can capture various browsers (or various browser settings, such as a console opened in IE or in strict mode), which now throw different exceptions, or perhaps your code base has changed since then.
JsTestDriver did not change the behavior for certain / undefined processing variables for 1.3.5, since it just catches browser exceptions.
Anyway, jsTestDriver does not call fail test, but calls validation when specifying undefined.
For example, for this piece of code in the code base (asuming undef is undefined var):
if(undef) alert("foo");
JsTestdriver output when running tests from the command line:
Total 2 tests (Passed: 1; Fails: 0; Errors: 1) (1,00 ms) Chrome 23.0.1271.64 Windows: Run 2 tests (Passed: 1; Fails: 0; Errors 1) (1,00 ms) PersonTest.testWhoAreYou error (0,00 ms): ReferenceError: undef is not defined
As you can see, the test suite had 1 error, but 0 failed .
EDIT . For your case, it would be possible for jsTestDriver to add a closure around your namespace definition. try it
Instead:
var Program = {};
Using:
window.Program = {};
for Program.Dialog you do not need to change anything
Please try to find out no reason.
source share