Allow currently registered reporters to be cleared

- jasmine/jasmine-npm#88
This commit is contained in:
Gregg Van Hove
2016-09-16 16:01:26 -07:00
parent ed31b9b844
commit 04bb56a5b5
4 changed files with 32 additions and 3 deletions

View File

@@ -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');