bench: reorder benchmark results

pull/14/head
Amio 2018-08-23 10:20:11 +08:00
rodzic 77ea9c6c34
commit c7ca57652c
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -2,6 +2,7 @@ const { Suite } = require('benchmark')
const badgen = require('..')
const dockerIcon = require('../test/docker-icon-b64.js')
/* eslint max-len: ["error", { "code": 90 }] */
const longParams = { subject: 'build-build-build', status: 'passing-passing-passing' }
const fullParams = { subject: 'license', status: 'Apache 2.0', color: 'cyan' }
const emojiParams = { subject: 'emojis', status: '💩🤱🦄💩🤱🦄', emoji: true }
@ -10,10 +11,10 @@ const iconParams = { subject: 'docker', status: 'badge', icon: dockerIcon }
new Suite()
.add('[classic] style, long params', () => badgen(longParams))
.add('[classic] style, full params', () => badgen(fullParams))
.add(' [flat] style, long params', () => badgen({ style: 'flat', ...longParams }))
.add(' [flat] style, full params', () => badgen({ style: 'flat', ...fullParams }))
.add('[classic] style, with emoji ', () => badgen(emojiParams))
.add('[classic] style, with icon ', () => badgen(iconParams))
.add(' [flat] style, long params', () => badgen({ style: 'flat', ...longParams }))
.add(' [flat] style, full params', () => badgen({ style: 'flat', ...fullParams }))
.add(' [flat] style, with emoji ', () => badgen({ style: 'flat', ...emojiParams }))
.add(' [flat] style, with icon ', () => badgen({ style: 'flat', ...iconParams }))
.on('cycle', event => console.log(String(event.target)))