theintern / intern

A next-generation code testing stack for JavaScript.
https://theintern.io/
Other
4.36k stars 309 forks source link

Refactor reporters to be factory-created event listeners #1135

Open jason0x43 opened 4 years ago

jason0x43 commented 4 years ago

Currently reporters are all implemented as classes based on a Reporter root class. Internally, however, they are simply event listeners. The reporter class structure was intended to provide some shared functionality for reporters, but it really ends up being overhead, and it obscures how the reporter system actually works.

Reimplement reporters as simple event listeners created by factory functions. Put any shared functionality in a utility module or modules.

See https://github.com/theintern/intern/issues/1023#issuecomment-582607277.