Commit 2a362c51 2a362c51abb5e70fcababf78cb91bc4561e4b433 by Nicolas Perriault

fixed single selftests were executed twice

1 parent dc4eea0d
...@@ -275,12 +275,8 @@ function bootstrap(global) { ...@@ -275,12 +275,8 @@ function bootstrap(global) {
275 } else if (phantom.casperArgs.get(0) === "selftest") { 275 } else if (phantom.casperArgs.get(0) === "selftest") {
276 phantom.casperScript = fs.absolute(fs.pathJoin(phantom.casperPath, 'tests', 'run.js')); 276 phantom.casperScript = fs.absolute(fs.pathJoin(phantom.casperPath, 'tests', 'run.js'));
277 phantom.casperSelfTest = true; 277 phantom.casperSelfTest = true;
278 phantom.casperArgs.options.includes = fs.pathJoin(phantom.casperPath, 'tests', 'selftest.js'); 278 //phantom.casperArgs.options.includes = fs.pathJoin(phantom.casperPath, 'tests', 'selftest.js');
279 if (phantom.casperArgs.args.length > 1) { 279 if (phantom.casperArgs.args.length <= 1) {
280 // we want a single test file
281 phantom.casperArgs.args.push(fs.pathJoin(phantom.casperPath, phantom.casperArgs.get(1)));
282 } else {
283 // run the whole casperjs test suite
284 phantom.casperArgs.args.push(fs.pathJoin(phantom.casperPath, 'tests', 'suites')); 280 phantom.casperArgs.args.push(fs.pathJoin(phantom.casperPath, 'tests', 'suites'));
285 } 281 }
286 phantom.casperArgs.drop("selftest"); 282 phantom.casperArgs.drop("selftest");
......