+ .then(r => {
+ return r
+ })
+ .catch(e => {
+ console.error(e)
+ })
+ }),
+ Benchmark.add('voided promise', () => {
+ // eslint-disable-next-line no-void
+ void asyncFunction()
+ }),
+ Benchmark.add('mishandled promise', () => {
+ asyncFunction()
+ }),
+ Benchmark.cycle(),
+ Benchmark.complete(),
+ Benchmark.save({
+ file: 'promise-handling',
+ format: 'json',
+ details: true
+ }),
+ Benchmark.save({
+ file: 'promise-handling',
+ format: 'chart.html',
+ details: true
+ }),
+ Benchmark.save({
+ file: 'promise-handling',
+ format: 'table.html',
+ details: true