jest-allure2-adapter
Version:
Allure 2 Adapter for jest
84 lines (83 loc) • 3.29 kB
TypeScript
/// <reference types="node" />
import { Allure, AllureStep, AllureTest, Attachment, Category, ContentType, ExecutableItemWrapper, LinkType, Severity, Stage, Status, StatusDetails, StepInterface } from 'allure-js-commons';
import { AllureAdapterConfig, AllureReporterApi, jasmine_ } from './index';
import { AllureCurrent } from './allure-current';
import { AttachmentOptions } from 'allure-js-commons/dist/src/model';
export declare class AllureReporter extends Allure implements AllureReporterApi {
private config?;
private runningTest;
private runningGroup;
private groupNameStack;
private stepStack;
private currentStepStatus;
private storyProps;
private featureProps;
private frameworkProps;
private languageProps;
private hostProps;
private environmentInfo;
private test_;
private executable;
constructor(config?: AllureAdapterConfig | undefined);
get test(): AllureCurrent;
get isTestActive(): boolean;
get currentTest(): AllureTest;
protected get currentExecutable(): ExecutableItemWrapper;
private get currentGroup();
private get currentStep();
startGroup(name: string): void;
startTest(spec: jasmine_.CustomReporterResult, start?: number): void;
startStep(name: string, start?: number): AllureStep;
stepStatus(status: Status, details?: StatusDetails | any): void;
endStep(status?: Status, stage?: Stage, details?: StatusDetails | any, end?: number): void;
setHistoryId(uid: string): void;
setFullName(fullName: string): void;
endTest(spec: jasmine_.CustomReporterResult, stop?: number): void;
endGroup(): void;
writeCategories(categories: Category[]): void;
step<T>(name: string, body?: (step: StepInterface) => T, start?: number, ...args: any[]): any;
addEnvironment(name: string, value: string): this;
logStep(name: string, status: Status, attachments?: [Attachment]): void;
attachment(name: string, content: Buffer | string, type?: ContentType | string | AttachmentOptions): void;
addParameter(name: string, value: string): this;
addParameters(...params: [string, any][]): this;
addPackage(value: string): this;
addLink(options: {
name?: string;
url: string;
type?: LinkType;
}): this;
addIssue(options: {
id: string;
name?: string;
url?: string;
}): this;
addTms(options: {
id: string;
name?: string;
url?: string;
}): this;
addLabel(name: string, value: string): this;
addDescription(description: string): void;
description(description: string): this;
descriptionHtml(description: string): this;
feature(feature: string): this;
story(story: string): this;
tag(tag: string): void;
owner(owner: string): void;
lead(lead: string): void;
framework(framework: string): void;
language(language: string): void;
as_id(id: string): void;
host(host: string): void;
testClass(testClass: string): void;
testMethod(testMethod: string): void;
severity(severity: Severity): void;
private endSteps;
private applyGroupping;
private applyDescription;
private findMessageAboutThrow;
private findAnyError;
private getAttachFile;
private featureStoryForSuite;
}