This repository was archived by the owner on Apr 11, 2024. It is now read-only.
allow trigger error, for better async test#205
Open
bluelovers wants to merge 3 commits intobestiejs:mainfrom
Open
allow trigger error, for better async test#205bluelovers wants to merge 3 commits intobestiejs:mainfrom
bluelovers wants to merge 3 commits intobestiejs:mainfrom
Conversation
* 'master' of https://github.com/bestiejs/benchmark.js: Remove sites from copyright header and package.json. Remove npm ci use from travis since it is called automatically. Update deps. chore: upgrade npm (bestiejs#202) chore: use npm ci (bestiejs#201) chore: add Node.js 8 and 10 (bestiejs#199) chore: remove Node.js 4 (bestiejs#203)
prantlf
reviewed
Jan 31, 2020
prantlf
left a comment
There was a problem hiding this comment.
You should drop the changes to package.json, if you want to get this request merged.
| bench = clone._original; | ||
|
|
||
| var event = Event('error'); | ||
| clone.error = event.message = error; |
There was a problem hiding this comment.
Is it not weird to set the error object as both error and message? Why not just the event.error? Or you could set error.message to event.message.
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.