Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Rename "assert.raises" to "assert.throws" #267

Closed
Krinkle opened this issue Jun 26, 2012 · 2 comments · Fixed by #268
Closed

Rename "assert.raises" to "assert.throws" #267

Krinkle opened this issue Jun 26, 2012 · 2 comments · Fixed by #268

Comments

@Krinkle
Copy link
Member

Krinkle commented Jun 26, 2012

I know we are famous for this and it appears justified:

QUnit's assertion methods follow the CommonJS Unit Testing specification, which was to some degree influenced by QUnit. A notable exception is throws (a reserved JavaScript identifier), which is called raises in QUnit.

But I've looked in many places and can't find a source to back this up:

While googling I did find several lists about Java reserved words (which includes throws), but not for ECMAScript.

@Krinkle
Copy link
Member Author

Krinkle commented Jun 26, 2012

Okay, so it looks like it was included in the list of "Future Reserved Words" in ES3.1 (not anymore in ES5). We should do a cross-browser test and find out whether browsers made an issue out of this. Maybe this research was done in the past, but I couldn't find it anywhere.

@Krinkle
Copy link
Member Author

Krinkle commented Jun 26, 2012

Chrome: { 19: true }
IE: { 10: true, 9: true, 8: true, 7: true, 6: true }
FF: { 12: true, 8: true, 3.6: true, 3.0: true }
Opera: { 11.6: true, 11.5: true, 11.1: true, 10.0: true }
Safari: { 5.1: true, 5.0: true, 4.0: true }

👍

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants