Socket
Socket
Sign inDemoInstall

jest-allure2-adapter

Package Overview
Dependencies
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-allure2-adapter - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

24

dist/reporter.d.ts
/// <reference types="node" />
import { Allure, AllureGroup, AllureStep, AllureTest, Attachment, Category, ContentType, ExecutableItemWrapper, IAllureConfig, Stage, Status, StepInterface } from 'allure-js-commons';
import { Allure, AllureGroup, LinkType, AllureStep, AllureTest, Attachment, Category, ContentType, ExecutableItemWrapper, IAllureConfig, Stage, Status, StepInterface } from 'allure-js-commons';
export declare class AllureReporter extends Allure {

@@ -31,2 +31,24 @@ private runningTest;

stepAttachement(name: string, content: Buffer | string, type: ContentType): void;
addCategory(category: Category): void;
addPackage(value: string): this;
description(description: string): this;
descriptionHtml(description: 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;
addAttachment(name: string, buffer: any, type: ContentType): this;
addTestAttachment(name: string, buffer: any, type: ContentType): this;
addLabel(name: string, value: string): this;
}

@@ -10,2 +10,3 @@ "use strict";

const path_1 = require("path");
const setup_1 = require("./setup");
var SpecStatus;

@@ -31,2 +32,3 @@ (function (SpecStatus) {

this.stepNameStack = [];
// const t = new AllureRuntime(config ?? { resultsDir: 'allure-results' });
}

@@ -247,3 +249,57 @@ get currentGroup() {

}
addCategory(category) {
// todo check if the same exist
setup_1.Categories.push(category);
}
addPackage(value) {
this.currentTest.addLabel(allure_js_commons_1.LabelName.PACKAGE, value);
return this;
}
description(description) {
this.currentTest.description = description;
return this;
}
descriptionHtml(description) {
this.currentTest.descriptionHtml = description;
return this;
}
addLink(options) {
this.currentTest.addLink(options.url, options.name, options.type);
return this;
}
addIssue(options) {
var _a;
const uri = 'some';
/* options.url ??
(this.config?.issueUri ? this.config.issueUri(options.id) : undefined);*/
if (!uri) {
throw new Error('Specify url or issueUri in config');
}
this.issue((_a = options.name) !== null && _a !== void 0 ? _a : options.id, uri);
return this;
}
addTms(options) {
var _a;
const uri = 'some';
/* options.url ??
(this.config?.tmsUri ? this.config.tmsUri(options.id) : undefined);*/
if (!uri) {
throw new Error('Specify url or tmsUri in config');
}
this.tms((_a = options.name) !== null && _a !== void 0 ? _a : options.id, uri);
return this;
}
addAttachment(name, buffer, type) {
this.stepAttachement(name, buffer, type);
return this;
}
addTestAttachment(name, buffer, type) {
this.attachment(name, buffer, type);
return this;
}
addLabel(name, value) {
this.currentTest.addLabel(name, value);
return this;
}
}
exports.AllureReporter = AllureReporter;

2

package.json
{
"name": "jest-allure2-adapter",
"version": "0.0.2",
"version": "0.0.3",
"description": "Allure 2 Adapter for jest",

@@ -5,0 +5,0 @@ "main": "dist/index",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc