-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add assert.throws #131
Add assert.throws #131
Conversation
Your example isn't validating that a TypeError is thrown, is it? Seems to only pass one parameter... |
Ah damn I forgot to amend that commit before pushing up. Will do when I get back to my computer. |
592c097
to
ee9774e
Compare
Fixed. Maybe we should add an arity check (perhaps testing that neither param is undefined? or that both are functions?) to prevent this in the future? It's a potential mistake for people coming from other frameworks where |
Yeah I think a check is good. Possibly just a check for func being defined is sufficient? |
ee9774e
to
439d52c
Compare
Added |
Do you think it's best to return after the $ERROR call so it bails out? Might prevent showing spurrious errors. |
Oh, I thought $ERROR was equivalent to throw Test262Error... |
No, that was the intention for $FAIL. $ERROR is "implementation defined" but may not throw to support reporting multiple errors from the same file. |
$ERROR(err) is effectively $DONE(err) I think. We probably don't need both even :-P. |
We need both because $DONE also indicates async On Wed, Dec 3, 2014 at 6:57 PM, Brian Terlson notifications@github.com
|
439d52c
to
66a39c0
Compare
Fixed to add In light of this I'm less confident about removing |
LGTM. Still not sure why FAIL is needed but perhaps we can discuss this once I specify the test262 environment more rigorously. |
No description provided.