Skip to content
Browse files

Fix a bug with Hiro running all suites even though we want just one

Yesterday I made a change that showed only the suite we wanted if
you specify its name in a querystring. But I forgot to update Hiro
itself to ignore all other suites so, as the result, today you
would *see* just one suite while Hiro would *run* all suites behind
the scenes. This patch fixes that.
  • Loading branch information...
1 parent ce1d5b6 commit 14f0d9052f2413a81850abbe8d08397e544fdf76 @valueof valueof committed May 17, 2012
Showing with 6 additions and 3 deletions.
  1. +5 −2 src/hiro.js
  2. +1 −1 src/webui/webui.js
View
7 src/hiro.js
@@ -120,7 +120,7 @@ Hiro.prototype = {
this.suites[name] = new Suite(name, _.extend.apply(_, mixin));
},
- run: function () {
+ run: function (name) {
var self = this;
self.status = RUNNING;
@@ -129,7 +129,10 @@ Hiro.prototype = {
self.trigger("hiro.onStart");
});
- var queue = _.map(self.suites, function (suite) {
+ var queue = _.filter(self.suites, function (suite) {
+ if (name && suite.name !== name)
+ return;
+
return suite;
});
View
2 src/webui/webui.js
@@ -47,7 +47,7 @@ var hiro, main;
return void hiro.run();
$("div.runall").click(function () {
- hiro.run();
+ hiro.run(req || undefined);
});
};

0 comments on commit 14f0d90

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