badgen/bench/index.js

13 wiersze
492 B
JavaScript
Czysty Zwykły widok Historia

2018-06-23 09:54:52 +00:00
const { Suite } = require('benchmark')
const badgen = require('..')
new Suite().add('generate by short params', function () {
badgen({ subject: 'b', status: 'p' })
}).add('generate by long params ', function () {
badgen({ subject: 'build-build-build', status: 'passing-passing-passing' })
}).add('generate by full params ', function () {
badgen({ subject: 'license', status: 'Apache-2.0', color: 'blue' })
}).on('cycle', function (event) {
console.log(String(event.target))
}).run()