benny-ascii-chart-reporter
ascii chart reporter for benny using chartscii
🔧 Install · 🧩 Example · 📜 API docs · 🔥 Releases · 💪🏼 Contribute · 🍻 Credits · 🖐️ Help
Install
$ npm i benny-ascii-chart-reporter
Example
import { suite, add, cycle, complete } from 'benny'
import { asciiChartReporter, Options } from 'benny-ascii-chart-reporter'
suite(
__filename,
add('Reduce two elements', () => {
;[1, 2].reduce((a, b) => a + b)
}),
add('Reduce five elements', () => {
;[1, 2, 3, 4, 5].reduce((a, b) => a + b)
}),
cycle(),
// just pass it to complete()
complete(
asciiChartReporter(<Options>{
theme: 'beach'
})
),
// complete() can be called again
// for the default report output
complete()
)
Output:
API
Table of Contents
asciiChartReporter
Create a benny ascii chart reporter.
Parameters
-
options
Options Chartscii options (optional, default{}
)
Returns CompleteFn The reporter function that can be passed to complete()
.
summary
The ascii chart reporter.
Parameters
-
summary
Summary The summary passed in the suite'scomplete()
callback.
Credits
Contribute
All contributions are welcome!
License
MIT © 2021 stagas