Skip to content
Browse files

Pass browser runner results to callback

  - Avoid incorrect exit code of 1 for successful tests
  • Loading branch information...
1 parent ba971ae commit fca05c26af2f0976924ab9c6f4240383a6dd3813 @cjohansen cjohansen committed Jul 10, 2012
Showing with 5 additions and 4 deletions.
  1. +2 −2 lib/runners/browser.js
  2. +1 −1 package.json
  3. +2 −1 test/runners/browser-test.js
View
4 lib/runners/browser.js
@@ -243,9 +243,9 @@ var testRun = {
return callback(hookError);
}
- runner.on("suite:end", function () {
+ runner.on("suite:end", function (results) {
this.endSession(session);
- callback();
+ callback(null, results);
}.bind(this));
}.bind(this));
},
View
2 package.json
@@ -1,6 +1,6 @@
{
"name": "buster-test-cli",
- "version": "0.6.1",
+ "version": "0.6.2",
"description": "Cli tools for Buster.JS test runners",
"homepage": "http://busterjs.org/docs/buster-test-cli",
"author": { "name": "August Lilleaas and Christian Johansen" },
View
3 test/runners/browser-test.js
@@ -705,9 +705,10 @@ buster.testCase("Browser runner", {
var callback = this.spy();
this.run.runTests(this.session, callback);
- this.remoteRunner.emit("suite:end");
+ this.remoteRunner.emit("suite:end", { ok: true });
assert.calledOnce(callback);
+ assert.calledWith(callback, null, { ok: true });
},
"prints to stderr on unsuccesful session close":

0 comments on commit fca05c2

Please sign in to comment.
Something went wrong with that request. Please try again.