Use QUnit `raises` instead of `throws`.
`throws` is a future reserved word.
Merge pull request #2818 from lukeasrodgers/use-raises-in-tests

Use QUnit `raises` instead of `throws`