benchmark.js
benchmark.js copied to clipboard
allow trigger error, for better async test
https://github.com/bluelovers/mocha-benchmark/blob/671c2f422d57662cb50eb2e3bb526ea12738f7ae/mocha_benchmark.ts#L297-L331
I like this change. I will adapt this to my fork.
With this I would add a isAsyncFunction check like the one I implemented in mongoose. Then if you pass an async function to the benchmarks, it should wrap the async function in the existing defer mode and resolve and reject can be assigned and it should work like a charm.