Commit b9944a93 b9944a931abd6d3d16679f66daf398136c182e1d by Nicolas Perriault

fixed edge case in xunit export

1 parent 96e2707f
......@@ -72,6 +72,7 @@ XXXX-XX-XX, v1.0.1
- fixed [#336](https://github.com/n1k0/casperjs/issues/336) - Test result duration may have an exotic value
- Added `casper.mouse.doubleclick()`
- fixed [#343](https://github.com/n1k0/casperjs/issues/343) - Better script checks
- fixed an edge case with xunit export when `phantom.casperScript` may be not defined
2012-12-24, v1.0.0
------------------
......
......@@ -45,7 +45,8 @@ var TestSuiteResult = require('tester').TestSuiteResult;
*/
function generateClassName(classname) {
"use strict";
var script = classname.replace(phantom.casperPath, "").trim() || phantom.casperScript;
classname = (classname || "").replace(phantom.casperPath, "").trim();
var script = classname || phantom.casperScript || "";
if (script.indexOf(fs.workingDirectory) === 0) {
script = script.substring(fs.workingDirectory.length + 1);
}
......