Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplified the reporter API and added support for third-party reporters #13

Merged
merged 3 commits into from Apr 4, 2014

Conversation

patrick-steele-idem
Copy link
Collaborator

I removed the need for reporters to inherit from Base and moved all of the static methods that were part of Base into the utils module. The Runner now collects the common stats (# of suites, # of benches and elapsed time) and passes the stats to the reporter as the argument to the end event listeners. Each reporter now is simply a module that exports a function of the following form:

module.exports = function(runner, utils) {
}

Lastly, I added support for using third-party reporters. Third-party reporters can either be installed via npm in the user's project or they can be referenced using a relative path that is considered relative to process.cwd(). For example:

matcha templating-benchmarks.js --reporter ./my-custom-reporter

Thanks for creating this module! I found it very helpful when building templating benchmarks: https://github.com/raptorjs3/templating-benchmarks

I wanted to be able to easily report additional information--hence the need for this Pull Request.

--Patrick

@logicalparadox
Copy link
Owner

thanks, looks great!

logicalparadox added a commit that referenced this pull request Apr 4, 2014
Simplified the reporter API and added support for third-party reporters
@logicalparadox logicalparadox merged commit 3a5dac2 into logicalparadox:master Apr 4, 2014
@logicalparadox
Copy link
Owner

Release in 0.5.0. Also, gave you push access to GH repo. Your contribution and usage warrants first class access. Please email me via my GH profile so that I have your email should I need to contact you directly in regards to this repo. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants