expectErrors(expectedErrors) {
    if (expectedErrors instanceof Array) {
      this.expectedErrors = this.expectedErrors.concat(expectedErrors);
    } else {
      this.expectedErrors.push(expectedErrors);
    }
    return this;
  }
Add expected error(s) for the test command.
Input is an object or list of objects of the following form:
{
  message: string, // optional regex
  stackTrace: string, //optional regex
}