@appium/base-driver
Version:
Base driver class for Appium drivers
16 lines (13 loc) • 427 B
text/typescript
import {errors} from '../protocol';
/**
* Route handler that throws {@link errors.UnknownCommandError} for testing.
*/
export function produceError(): never {
throw new errors.UnknownCommandError('Produced generic error for testing');
}
/**
* Route handler that throws a generic Error for testing (e.g. crash scenarios).
*/
export function produceCrash(): never {
throw new Error('We just tried to crash Appium!');
}