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)