Assert that SyntaxError DOMException is thrown

Previous commit was merged before Simon's review comments could be addressed (https://critic.hoppipolla.co.uk/r/1506)
Merge pull request #990 from caitp/patch-4

Assert that SyntaxError DOMException is thrown