1 const Benchmark
= require('benny')
7 return new Promise(resolve
=> {
15 async
function asyncFunction () {
16 return await
promise()
21 Benchmark
.add('await promise', async () => {
23 return await
asyncFunction()
28 Benchmark
.add('promise with then().catch()', () => {
37 Benchmark
.add('voided promise', () => {
38 // eslint-disable-next-line no-void
41 Benchmark
.add('mishandled promise', () => {
47 file
: 'promise-handling',
52 file
: 'promise-handling',
57 file
: 'promise-handling',