Quantcast
Channel: Chutzpah - A JavaScript Test Runner
Viewing all articles
Browse latest Browse all 1864

New Post: Error: TypeError: 'null' is not an object (evaluating 'activeTestCase.timetaken = timetaken')

$
0
0
Well, a little further. You've got these lines in JasmineRunnerV2.js, c. line 108:
var timetaken = new Date().getTime() - testStartTime;
activeTestCase.timetaken = timetaken;
If I hack together a check for activeTestCase, everything starts working - more-or-less:
var timetaken = new Date().getTime() - testStartTime;
if (!activeTestCase) {
    console.log("activeTestCase was null or undefined; failedCount=" + failedCount + '; passedCount=' + passedCount);
    activeTestCase = { moduleName: "dunno", testName: "dunno", testResults: [] };
}
activeTestCase.timetaken = timetaken;
This then shows up in the output:
#_#Log#_# {"type":"Log","log":{"message":"activeTestCase was null or undefined; failedCount=0; passedCount=1"}}
That's a hack, obviously, rather than a fix. Any thoughts on how the activeTestCase isn't getting set?

Viewing all articles
Browse latest Browse all 1864

Trending Articles