fixed single selftests were executed twice
Showing
1 changed file
with
2 additions
and
6 deletions
... | @@ -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"); | ... | ... |
-
Please register or sign in to post a comment