function throwIfFailed() {
  if (allErrors.length >= 1 && !global.WF.options.testWarnOnly) {
    let errorMessage = `There were ${allErrors.length} errors.`;
    throw new Error(errorMessage);
  }
}
Throws an exception if there are any test failures.