Use RegExp for test.throws()

throws() expects the "expect" argument to be a RegExp.