Adjusts unit test regarding exception in injected scripts so that it accounts for the exception being thrown in an event loop for remote scripts