1.0.1 • Published 4 years ago
benny-ascii-chart-reporter v1.0.1
Install
$ npm i benny-ascii-chart-reporterExample
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
optionsOptions Chartscii options (optional, default{})
Returns CompleteFn The reporter function that can be passed to complete().
summary
The ascii chart reporter.
Parameters
summarySummary The summary passed in the suite'scomplete()callback.
Credits
Contribute
All contributions are welcome!
License
MIT © 2021 stagas
1.0.1
4 years ago