How to use the allure-js-commons.Status.PASSED function in allure-js-commons

To help you get started, we’ve selected a few allure-js-commons examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github allure-framework / allure-js / packages / allure-cucumberjs / src / utilities.ts View on Github external
export function statusTextToAllure(status?: string): Status {
  if (status === "passed") return Status.PASSED;
  if (status === "skipped") return Status.SKIPPED;
  if (status === "failed") return Status.FAILED;
  return Status.BROKEN;
}
github allure-framework / allure-js / packages / allure-jasmine / src / JasmineAllureReporter.ts View on Github external
step.stage = Stage.INTERRUPTED;
        step.detailsMessage = "Timeout";
        step.endStep();
      }
      this.stepStack = [];
    }

    if (spec.status === SpecStatus.PENDING || spec.status === SpecStatus.DISABLED
      || spec.status === SpecStatus.EXCLUDED) {
      currentTest.status = Status.SKIPPED;
      currentTest.stage = Stage.PENDING;
      currentTest.detailsMessage = spec.pendingReason || "Suite disabled";
    }
    currentTest.stage = Stage.FINISHED;
    if (spec.status === SpecStatus.PASSED) {
      currentTest.status = Status.PASSED;
    }
    if (spec.status === SpecStatus.BROKEN) {
      currentTest.status = Status.BROKEN;
    }
    if (spec.status === SpecStatus.FAILED) {
      currentTest.status = Status.FAILED;
    }

    const exceptionInfo = this.findMessageAboutThrow(spec.failedExpectations)
      || this.findAnyError(spec.failedExpectations);
    if (exceptionInfo !== null) {
      currentTest.detailsMessage = exceptionInfo.message;
      currentTest.detailsTrace = exceptionInfo.stack;
    }

    currentTest.endTest();
github allure-framework / allure-js / packages / allure-mocha / src / AllureReporter.ts View on Github external
public passTestCase(test: Mocha.Test) {
    if (this.currentTest === null) {
      this.startCase(test);
    }
    this.endTest(Status.PASSED);
  }