1 import Benchmark from 'benny'
6 async function asyncFunction () {
7 await new Promise(resolve => {
14 Benchmark.add('await promise', async () => {
16 return await asyncFunction()
21 Benchmark.add('promise with then().catch()', () => {
28 Benchmark.add('voided promise', () => {
29 // eslint-disable-next-line no-void
32 Benchmark.add('mishandled promise', () => {
38 file: 'promise-handling',
43 file: 'promise-handling',
48 file: 'promise-handling',
52 ).catch(console.error)