added tests for error event