-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Description
@novemberborn , what do you think about creating an API for custom reporters (not only reporters, probably)?
Something like an array of objects in settings, each object implements some set of functions called for each hook.
Like
class Reporter {
onBeforeStart(t: Context);
onBeforeEnd(t: Context);
onBeforeEachStart(t: Context);
onBeforeEachEnd(t: Context);
onAssertionFailure(t: Context);
onTestStart(t: Context);
onTestEnd(t: Context);
onAfterEachStart(t: Context);
onAfterEachEnd(t: Context);
onAfterStart(t: Context);
onAfterEnd(t: Context);
}
ANd then in config file something like
const customReporter = new Reporter();
export default {
plugins: [customReporter]
}
That would allow creating different plugins/reporters easily.