Console spec reporter allows focused specs

This commit is contained in:
Corey Johnson
2013-02-20 16:28:49 -08:00
parent 4db982f9e5
commit f7bc1186c5

View File

@@ -45,5 +45,19 @@ jasmine.ConsoleReporter.prototype.reportSpecResults = function(spec) {
};
jasmine.ConsoleReporter.prototype.specFilter = function(spec) {
return true;
var globalFocusPriority = jasmine.getEnv().focusPriority
var parent = spec.parentSuite || spec.suite
if (!globalFocusPriority) {
return true
}
else if (spec.focusPriority >= globalFocusPriority) {
return true
}
else if (!parent) {
return false
}
else {
return this.specFilter(parent)
}
};