fixed selftest single test path resolution
Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -216,7 +216,7 @@ CasperError.prototype = Object.getPrototypeOf(new Error()); | ... | @@ -216,7 +216,7 @@ CasperError.prototype = Object.getPrototypeOf(new Error()); |
216 | phantom.casperScript = fs.absolute(fs.pathJoin(baseTestsPath, 'run.js')); | 216 | phantom.casperScript = fs.absolute(fs.pathJoin(baseTestsPath, 'run.js')); |
217 | phantom.casperTest = true; | 217 | phantom.casperTest = true; |
218 | phantom.casperArgs.drop("test"); | 218 | phantom.casperArgs.drop("test"); |
219 | phantom.casperScriptBaseDir = fs.dirname(phantom.casperArgs.get(0)); | 219 | phantom.casperScriptBaseDir = fs.dirname(phantom.casperArgs.get(1)); |
220 | } else if (phantom.casperArgs.get(0) === "selftest") { | 220 | } else if (phantom.casperArgs.get(0) === "selftest") { |
221 | phantom.casperScript = fs.absolute(fs.pathJoin(baseTestsPath, 'run.js')); | 221 | phantom.casperScript = fs.absolute(fs.pathJoin(baseTestsPath, 'run.js')); |
222 | phantom.casperSelfTest = phantom.casperTest = true; | 222 | phantom.casperSelfTest = phantom.casperTest = true; |
... | @@ -225,7 +225,7 @@ CasperError.prototype = Object.getPrototypeOf(new Error()); | ... | @@ -225,7 +225,7 @@ CasperError.prototype = Object.getPrototypeOf(new Error()); |
225 | phantom.casperArgs.args.push(fs.pathJoin(baseTestsPath, 'suites')); | 225 | phantom.casperArgs.args.push(fs.pathJoin(baseTestsPath, 'suites')); |
226 | } | 226 | } |
227 | phantom.casperArgs.drop("selftest"); | 227 | phantom.casperArgs.drop("selftest"); |
228 | phantom.casperScriptBaseDir = fs.dirname(phantom.casperArgs.get(0) || fs.dirname(phantom.casperScript)); | 228 | phantom.casperScriptBaseDir = fs.dirname(phantom.casperArgs.get(1) || fs.dirname(phantom.casperScript)); |
229 | } else if (phantom.casperArgs.args.length === 0 || !!phantom.casperArgs.options.help) { | 229 | } else if (phantom.casperArgs.args.length === 0 || !!phantom.casperArgs.options.help) { |
230 | return printHelp(); | 230 | return printHelp(); |
231 | } | 231 | } | ... | ... |
-
Please register or sign in to post a comment