build(deps-dev): Bump @commitlint/cli from 18.2.0 to 18.4.0
[benchmarks-js.git] / promise-handling.mjs
index b3b02107c9cfc793a7c3149db013236df206b8bb..7f450b3fc53c58f3e93abd821b6490ba7519d260 100644 (file)
@@ -3,19 +3,12 @@ import Benchmark from 'benny'
 /**
  *
  */
-function promise () {
-  return new Promise(resolve => {
+async function asyncFunction () {
+  await new Promise(resolve => {
     resolve()
   })
 }
 
-/**
- *
- */
-async function asyncFunction () {
-  return await promise()
-}
-
 Benchmark.suite(
   'Promise handling',
   Benchmark.add('await promise', async () => {