Allow currently registered reporters to be cleared
- jasmine/jasmine-npm#88
This commit is contained in:
@@ -278,6 +278,10 @@ getJasmineRequireObj().Env = function(j$) {
|
||||
reporter.provideFallbackReporter(reporterToAdd);
|
||||
};
|
||||
|
||||
this.clearReporters = function() {
|
||||
reporter.clearReporters();
|
||||
};
|
||||
|
||||
var spyRegistry = new j$.SpyRegistry({currentSpies: function() {
|
||||
if(!currentRunnable()) {
|
||||
throw new Error('Spies must be created in a before function or a spec');
|
||||
|
||||
@@ -18,11 +18,14 @@ getJasmineRequireObj().ReportDispatcher = function() {
|
||||
this.addReporter = function(reporter) {
|
||||
reporters.push(reporter);
|
||||
};
|
||||
|
||||
|
||||
this.provideFallbackReporter = function(reporter) {
|
||||
fallbackReporter = reporter;
|
||||
};
|
||||
|
||||
this.clearReporters = function() {
|
||||
reporters = [];
|
||||
};
|
||||
|
||||
return this;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user