Installation
npm install --save @types/allure-js-commons
Summary
This package contains type definitions for allure-js-commons (https://github.com/allure-framework/allure-js).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/allure-js-commons.
index.d.ts
declare class Allure {
constructor();
setOptions(options: Allure.Options): void;
getCurrentSuite(): Allure.Suite;
getCurrentTest(): Allure.Test;
startSuite(suiteName: string, timestamp?: number): void;
endSuite(timestamp?: number): void;
startCase(testName: string, timestamp?: number): void;
endCase(status: Allure.Status, err?: {}, timestamp?: number): void;
startStep(stepName: string, timestamp?: number): void;
endStep(status: Allure.Status, timestamp?: number): void;
setDescription(description: string, timestamp?: number): void;
addAttachment(attachmentName: string, buffer: any, type: string): void;
pendingCase(testName: string, timestamp?: number): void;
}
export = Allure;
export as namespace Allure;
declare namespace Allure {
interface Options {
targetDir: string;
}
type Status = "passed" | "pending" | "skipped" | "failed" | "broken";
enum TYPE {
TEXT = "text",
HTML = "html",
MARKDOWN = "markdown",
}
class Suite {
constructor(name: string, timestamp?: number);
name: string;
end(timestamp?: number): void;
hasTests(): boolean;
addTest(test: Test): boolean;
toXML(): string;
}
class Test {
constructor(name: string, timestamp?: number);
setDescription(description: string, type: TYPE): void;
addLabel(name: string, value: string): void;
addParameter(kind: any, name: string, value: string): void;
addStep(step: Step): void;
addAttachment(attachment: Attachment): void;
end(status: Status, error: Error, timestamp?: number): void;
toXML(): string;
}
class Description {
constructor(value: string, type: TYPE);
toXML(): string;
}
class Step {
constructor(name: string, timestamp?: number);
addStep(step: Step): void;
addAttachment(attachment: Attachment): void;
end(status: Status, error: Error, timestamp?: number): void;
toXML(): string;
}
class Attachment {
constructor(title: string, source: any, size: number, mime: string);
addStep(step: Step): void;
addAttachment(attachment: Attachment): void;
end(status: Status, error: Error, timestamp?: number): void;
toXML(): string;
}
}
Additional Details
- Last updated: Mon, 06 Nov 2023 22:41:04 GMT
- Dependencies: none
Credits
These definitions were written by Denis Artyuhovich.