forked from tapjs/tapjs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RFC: bin/run: Add --reporter-options
This PR depends on tapjs/tap-mocha-reporter#49; review that first. This is inspired by [Mocha's][1]: ``` --reporter-options <k=v,k2=v2,...> ``` Except: * I'm using a JSON value for easier parsing and more explicit typing. This will end up using a few more characters, but the format is more explicit than Mocha's (which only uses string values?). And callers are likely to already be familiar with JSON, so we save the mental overhead of teaching them a new serialization format. * I'm using a 'reporter' namespace. This allows us to add other namespaces in the future to address other configurable aspects of tap-mocha-reporter's Formatter. For example, we could use this same CLI option to configure the runner. Somewhat related to this, if we have plans for allowing multiple reporters [2], we may want to namespace *those* now. For example: ``` --reporter-options {"reporter": {"progress": {"open": "(", "close": ")"}}} ``` to avoid the issues Mocha bumped into [3] when trying to add multi-reporter support. [1]: https://mochajs.org/#usage [2]: tapjs#335 [3]: mochajs/mocha#2184 (comment)
- Loading branch information
Showing
5 changed files
with
27 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters