-
Notifications
You must be signed in to change notification settings - Fork 779
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
Bring back assert.raises #663
Comments
👍 to APIs that don't use (formerly) reserved words. |
shrugs Sure. It would be ideal for reducing confusion to only have 1 method name but I guess we can keep both. Why did we move to |
It was all #267, right? |
Gotcha. Spec compliance strikes again! |
+1 to bring back the |
Seems like we should just do this in My general preference is exposing as much of the |
Yeah, let's do this in 1.16. CommonJS doesn't matter anyway. |
Brings back the original method name, for compatibility with environments that consider 'throws' a reserved word. Fixes qunitjs#663
I probably misread this issue, I believed we would rename throws to raises and make throws deprecated. Well, I prefer having only one method, making both existing as a temporary backwards compat. |
I wrote on the original ticket:
Was that so ambiguous? I still think this is a good approach. |
It wasn't ambiguous, that was my fault on misunderstanding what you've said and to not explain better what I wanted. |
sorry for close/re-opening, clicked on the wrong button. |
Brings back the original method name, for compatibility with environments that consider 'throws' a reserved word. Fixes qunitjs#663
Brings back the original method name, for compatibility with environments that consider 'throws' a reserved word. Fixes qunitjs#663 Closes qunitjs#675
This is something that came up in #540.
throws
is problematic in some environments, which theraises
alias avoids. We could just addassert.raises = assert['throws'];
in the source and add a note about the alias in the documentation forthrows
. Very little effort to provide a simple workaround whenthrows
can't be used.For some history, #323 got rid of parsing errors due to QUnit using
throws
in the first place. The same workaround is still need to use the method in tests.It would be useful to have a list of environments affected by this. From the PR linked above, I know of Closure Compiler and Narwhal. @jdalton do you know of others?
The text was updated successfully, but these errors were encountered: