New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

allure-cucumberjs

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

allure-cucumberjs - npm Package Compare versions

Comparing version 2.0.0-beta.2 to 2.0.0-beta.3

167

dist/src/CucumberAllureInterface.js
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var allure_js_commons_1 = require("allure-js-commons");
var CucumberAllureInterface = (function (_super) {
__extends(CucumberAllureInterface, _super);
function CucumberAllureInterface(reporter) {
var _this = _super.call(this) || this;
_this.reporter = reporter;
return _this;
const allure_js_commons_1 = require("allure-js-commons");
class CucumberAllureInterface extends allure_js_commons_1.AllureInterface {
constructor(reporter) {
super();
this.reporter = reporter;
}
Object.defineProperty(CucumberAllureInterface.prototype, "currentExecutable", {
get: function () {
var result = this.reporter.currentStep || this.reporter.currentTest;
if (result === null)
throw new Error("No executable!");
return result;
},
enumerable: true,
configurable: true
});
Object.defineProperty(CucumberAllureInterface.prototype, "currentTest", {
get: function () {
if (this.reporter.currentTest === null)
throw new Error("No test running!");
return this.reporter.currentTest;
},
enumerable: true,
configurable: true
});
CucumberAllureInterface.prototype.setDescription = function (text) {
get currentExecutable() {
const result = this.reporter.currentStep || this.reporter.currentTest;
if (result === null)
throw new Error("No executable!");
return result;
}
get currentTest() {
if (this.reporter.currentTest === null)
throw new Error("No test running!");
return this.reporter.currentTest;
}
setDescription(text) {
this.currentExecutable.description = text;
this.currentExecutable.descriptionHtml = text;
};
CucumberAllureInterface.prototype.setTestDescription = function (text) {
}
setTestDescription(text) {
this.currentTest.description = text;
this.currentTest.descriptionHtml = text;
};
CucumberAllureInterface.prototype.setFlaky = function () {
}
setFlaky() {
this.currentExecutable.detailsFlaky = true;
};
CucumberAllureInterface.prototype.setKnown = function () {
}
setKnown() {
this.currentExecutable.detailsKnown = true;
};
CucumberAllureInterface.prototype.setMuted = function () {
}
setMuted() {
this.currentExecutable.detailsMuted = true;
};
CucumberAllureInterface.prototype.addOwner = function (owner) {
}
addOwner(owner) {
this.currentTest.addLabel(allure_js_commons_1.LabelName.OWNER, owner);
};
CucumberAllureInterface.prototype.setSeverity = function (severity) {
}
setSeverity(severity) {
this.currentTest.addLabel(allure_js_commons_1.LabelName.SEVERITY, severity);
};
CucumberAllureInterface.prototype.addIssue = function (issue) {
}
addIssue(issue) {
this.currentTest.addLabel(allure_js_commons_1.LabelName.ISSUE, issue);
};
CucumberAllureInterface.prototype.addTag = function (tag) {
}
addTag(tag) {
this.currentTest.addLabel(allure_js_commons_1.LabelName.TAG, tag);
};
CucumberAllureInterface.prototype.addTestType = function (type) {
}
addTestType(type) {
this.currentTest.addLabel(allure_js_commons_1.LabelName.TEST_TYPE, type);
};
CucumberAllureInterface.prototype.addLink = function (name, url, type) {
}
addLink(name, url, type) {
this.currentTest.addLink(name, url, type);
};
CucumberAllureInterface.prototype.startStep = function (name) {
var allureStep = this.currentExecutable.startStep(name);
}
startStep(name) {
const allureStep = this.currentExecutable.startStep(name);
this.reporter.pushStep(allureStep);
return new WrappedStep(this.reporter, allureStep);
};
CucumberAllureInterface.prototype.step = function (name, body) {
var wrappedStep = this.startStep(name);
var result;
}
step(name, body) {
const wrappedStep = this.startStep(name);
let result;
try {

@@ -94,7 +71,7 @@ result = wrappedStep.run(body);

if (allure_js_commons_1.isPromise(result)) {
var promise = result;
return promise.then(function (a) {
const promise = result;
return promise.then(a => {
wrappedStep.endStep();
return a;
}).catch(function (e) {
}).catch(e => {
wrappedStep.endStep();

@@ -108,43 +85,41 @@ throw e;

}
};
CucumberAllureInterface.prototype.attachment = function (name, content, type) {
var file = this.reporter.writeAttachment(content, type);
}
attachment(name, content, type) {
const file = this.reporter.writeAttachment(content, type);
this.currentExecutable.addAttachment(name, type, file);
};
CucumberAllureInterface.prototype.testAttachment = function (name, content, type) {
var file = this.reporter.writeAttachment(content, type);
}
testAttachment(name, content, type) {
const file = this.reporter.writeAttachment(content, type);
this.currentTest.addAttachment(name, type, file);
};
CucumberAllureInterface.prototype.addParameter = function (name, value) {
}
addParameter(name, value) {
this.currentTest.addParameter(name, value);
};
CucumberAllureInterface.prototype.addLabel = function (name, value) {
}
addLabel(name, value) {
this.currentTest.addLabel(name, value);
};
CucumberAllureInterface.prototype.getGlobalInfoWriter = function () {
}
getGlobalInfoWriter() {
return this.reporter.getGlobalInfoWriter();
};
return CucumberAllureInterface;
}(allure_js_commons_1.AllureInterface));
}
}
exports.CucumberAllureInterface = CucumberAllureInterface;
var WrappedStep = (function () {
function WrappedStep(reporter, step) {
class WrappedStep {
constructor(reporter, step) {
this.reporter = reporter;
this.step = step;
}
WrappedStep.prototype.startStep = function (name) {
var step = this.step.startStep(name);
startStep(name) {
const step = this.step.startStep(name);
this.reporter.pushStep(step);
return new WrappedStep(this.reporter, step);
};
WrappedStep.prototype.endStep = function () {
}
endStep() {
this.reporter.popStep();
this.step.endStep();
};
WrappedStep.prototype.run = function (body) {
}
run(body) {
return this.step.wrap(body)();
};
return WrappedStep;
}());
}
}
exports.WrappedStep = WrappedStep;
//# sourceMappingURL=CucumberAllureInterface.js.map
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
var cucumber_1 = require("cucumber");
var allure_js_commons_1 = require("allure-js-commons");
var SourceLocation_1 = require("./events/SourceLocation");
var Example_1 = require("./events/Example");
var CucumberAllureInterface_1 = require("./CucumberAllureInterface");
var utilities_1 = require("./utilities");
const cucumber_1 = require("cucumber");
const allure_js_commons_1 = require("allure-js-commons");
const SourceLocation_1 = require("./events/SourceLocation");
const Example_1 = require("./events/Example");
const CucumberAllureInterface_1 = require("./CucumberAllureInterface");
const utilities_1 = require("./utilities");
var allure_js_commons_2 = require("allure-js-commons");
exports.AllureInterface = allure_js_commons_2.AllureInterface;
var CucumberJSAllureFormatterConfig = (function () {
function CucumberJSAllureFormatterConfig() {
}
return CucumberJSAllureFormatterConfig;
}());
class CucumberJSAllureFormatterConfig {
}
exports.CucumberJSAllureFormatterConfig = CucumberJSAllureFormatterConfig;
var CucumberJSAllureFormatter = (function (_super) {
__extends(CucumberJSAllureFormatter, _super);
function CucumberJSAllureFormatter(options, allureRuntime, config) {
var _this = _super.call(this, options) || this;
_this.allureRuntime = allureRuntime;
_this.sourceMap = new Map();
_this.stepsMap = new Map();
_this.featureMap = new Map();
_this.stepStack = [];
_this.currentGroup = null;
_this.currentTest = null;
_this.currentBefore = null;
_this.currentAfter = null;
class CucumberJSAllureFormatter extends cucumber_1.Formatter {
constructor(options, allureRuntime, config) {
super(options);
this.allureRuntime = allureRuntime;
this.sourceMap = new Map();
this.stepsMap = new Map();
this.featureMap = new Map();
this.stepStack = [];
this.currentGroup = null;
this.currentTest = null;
this.currentBefore = null;
this.currentAfter = null;
options.eventBroadcaster
.on("source", _this.onSource.bind(_this))
.on("gherkin-document", _this.onGherkinDocument.bind(_this))
.on("test-case-prepared", _this.onTestCasePrepared.bind(_this))
.on("test-case-started", _this.onTestCaseStarted.bind(_this))
.on("test-step-started", _this.onTestStepStarted.bind(_this))
.on("test-step-attachment", _this.onTestStepAttachment.bind(_this))
.on("test-step-finished", _this.onTestStepFinished.bind(_this))
.on("test-case-finished", _this.onTestCaseFinished.bind(_this));
_this.labels = config.labels || {};
_this.exceptionFormatter = function (message) {
.on("source", this.onSource.bind(this))
.on("gherkin-document", this.onGherkinDocument.bind(this))
.on("test-case-prepared", this.onTestCasePrepared.bind(this))
.on("test-case-started", this.onTestCaseStarted.bind(this))
.on("test-step-started", this.onTestStepStarted.bind(this))
.on("test-step-attachment", this.onTestStepAttachment.bind(this))
.on("test-step-finished", this.onTestStepFinished.bind(this))
.on("test-case-finished", this.onTestCaseFinished.bind(this));
this.labels = config.labels || {};
this.exceptionFormatter = function (message) {
if (config.exceptionFormatter !== undefined) {

@@ -70,3 +42,3 @@ try {

catch (e) {
console.warn("Error in exceptionFormatter: " + e);
console.warn(`Error in exceptionFormatter: ${e}`);
}

@@ -76,22 +48,19 @@ }

};
_this.allureInterface = new CucumberAllureInterface_1.CucumberAllureInterface(_this);
options.supportCodeLibrary.World.prototype.allure = _this.allureInterface;
_this.beforeHooks = options.supportCodeLibrary.beforeTestCaseHookDefinitions;
_this.afterHooks = options.supportCodeLibrary.afterTestCaseHookDefinitions;
return _this;
this.allureInterface = new CucumberAllureInterface_1.CucumberAllureInterface(this);
options.supportCodeLibrary.World.prototype.allure = this.allureInterface;
this.beforeHooks = options.supportCodeLibrary.beforeTestCaseHookDefinitions;
this.afterHooks = options.supportCodeLibrary.afterTestCaseHookDefinitions;
}
CucumberJSAllureFormatter.prototype.onSource = function (data) {
onSource(data) {
this.sourceMap.set(data.uri, data.data.split(/\n/));
};
CucumberJSAllureFormatter.prototype.onGherkinDocument = function (data) {
}
onGherkinDocument(data) {
data.document.caseMap = new Map();
data.document.stepMap = new Map();
if (data.document.feature !== undefined) {
for (var _i = 0, _a = data.document.feature.children || []; _i < _a.length; _i++) {
var test = _a[_i];
for (const test of data.document.feature.children || []) {
test.stepMap = new Map();
if (test.type === "Background") {
data.document.stepMap = new Map();
for (var _b = 0, _c = test.steps; _b < _c.length; _b++) {
var step = _c[_b];
for (const step of test.steps) {
step.isBackground = true;

@@ -102,4 +71,3 @@ data.document.stepMap.set(step.location.line, step);

else {
for (var _d = 0, _e = test.steps; _d < _e.length; _d++) {
var step = _e[_d];
for (const step of test.steps) {
test.stepMap.set(step.location.line, step);

@@ -109,5 +77,4 @@ }

if (test.type === "ScenarioOutline") {
for (var _f = 0, _g = Example_1.examplesToSensibleFormat(test.examples || []); _f < _g.length; _f++) {
var example = _g[_f];
var copy = __assign({}, test);
for (const example of Example_1.examplesToSensibleFormat(test.examples || [])) {
const copy = Object.assign({}, test);
copy.example = example;

@@ -123,4 +90,4 @@ data.document.caseMap.set(example.line, copy);

this.featureMap.set(data.uri, data.document);
};
CucumberJSAllureFormatter.prototype.onTestCasePrepared = function (data) {
}
onTestCasePrepared(data) {
this.stepsMap.clear();

@@ -130,9 +97,9 @@ this.stepsMap.set(SourceLocation_1.SourceLocation.toKey(data), data.steps);

this.currentAfter = null;
};
CucumberJSAllureFormatter.prototype.onTestCaseStarted = function (data) {
var feature = this.featureMap.get(data.sourceLocation.uri);
}
onTestCaseStarted(data) {
const feature = this.featureMap.get(data.sourceLocation.uri);
if (feature === undefined || feature.feature === undefined) {
throw new Error("Unknown feature");
}
var test = feature.caseMap === undefined
const test = feature.caseMap === undefined
? undefined : feature.caseMap.get(data.sourceLocation.line);

@@ -145,3 +112,3 @@ if (test === undefined) {

this.currentGroup.startTest(utilities_1.applyExample(test.name || "Unnamed test", test.example));
var info = {
const info = {
f: feature.feature.name,

@@ -153,3 +120,3 @@ t: test.name,

info.a = test.example.arguments;
for (var prop in test.example.arguments) {
for (const prop in test.example.arguments) {
if (!test.example.arguments.hasOwnProperty(prop))

@@ -161,14 +128,12 @@ continue;

this.currentTest.historyId = utilities_1.hash(JSON.stringify(info));
this.currentTest.addLabel(allure_js_commons_1.LabelName.THREAD, "" + process.pid);
this.currentTest.addLabel(allure_js_commons_1.LabelName.THREAD, `${process.pid}`);
this.currentTest.addLabel(allure_js_commons_1.LabelName.FEATURE, feature.feature.name);
this.currentTest.description = utilities_1.stripIndent(test.description || "");
for (var _i = 0, _a = (test.tags || []).concat(feature.feature.tags); _i < _a.length; _i++) {
var tag = _a[_i];
for (const tag of [...(test.tags || []), ...feature.feature.tags]) {
this.currentTest.addLabel(allure_js_commons_1.LabelName.TAG, tag.name);
for (var label in this.labels) {
for (const label in this.labels) {
if (!this.labels.hasOwnProperty(label))
continue;
for (var _b = 0, _c = this.labels[label]; _b < _c.length; _b++) {
var reg = _c[_b];
var match = tag.name.match(reg);
for (const reg of this.labels[label]) {
const match = tag.name.match(reg);
if (match != null && match.length > 1) {

@@ -180,13 +145,13 @@ this.currentTest.addLabel(label, match[1]);

}
};
CucumberJSAllureFormatter.prototype.onTestStepStarted = function (data) {
var location = (this.stepsMap.get(SourceLocation_1.SourceLocation.toKey(data.testCase)) || [])[data.index];
var feature = this.featureMap.get(data.testCase.sourceLocation.uri);
}
onTestStepStarted(data) {
const location = (this.stepsMap.get(SourceLocation_1.SourceLocation.toKey(data.testCase)) || [])[data.index];
const feature = this.featureMap.get(data.testCase.sourceLocation.uri);
if (feature === undefined)
throw new Error("Unknown feature");
var test = feature.caseMap === undefined
const test = feature.caseMap === undefined
? undefined : feature.caseMap.get(data.testCase.sourceLocation.line);
if (test === undefined)
throw new Error("Unknown scenario");
var step;
let step;
if (location.sourceLocation !== undefined && feature.stepMap !== undefined) {

@@ -204,3 +169,3 @@ step = test.stepMap.get(location.sourceLocation.line)

location: { line: -1 },
text: location.actionLocation.uri + ":" + location.actionLocation.line,
text: `${location.actionLocation.uri}:${location.actionLocation.line}`,
keyword: ""

@@ -211,5 +176,4 @@ };

throw new Error("Unknown step");
var stepText = utilities_1.applyExample("" + step.keyword + step.text, test.example);
var isAfter = this.afterHooks.find(function (_a) {
var uri = _a.uri, line = _a.line;
let stepText = utilities_1.applyExample(`${step.keyword}${step.text}`, test.example);
const isAfter = this.afterHooks.find(({ uri, line }) => {
if (location.actionLocation === undefined)

@@ -220,4 +184,3 @@ return false;

});
var isBefore = this.beforeHooks.find(function (_a) {
var uri = _a.uri, line = _a.line;
const isBefore = this.beforeHooks.find(({ uri, line }) => {
if (location.actionLocation === undefined)

@@ -235,3 +198,3 @@ return false;

this.currentBefore = this.currentGroup.addBefore();
stepText = "Before: " + (isBefore.code.name || step.text);
stepText = `Before: ${isBefore.code.name || step.text}`;
}

@@ -241,3 +204,3 @@ else if (isAfter) {

this.currentAfter = this.currentGroup.addAfter();
stepText = "After: " + (isAfter.code.name || step.text);
stepText = `After: ${isAfter.code.name || step.text}`;
}

@@ -250,28 +213,28 @@ else {

}
var allureStep = (this.currentAfter || this.currentBefore || this.currentTest).startStep(stepText);
const allureStep = (this.currentAfter || this.currentBefore || this.currentTest).startStep(stepText);
this.pushStep(allureStep);
if (step.argument !== undefined) {
if (step.argument.content !== undefined) {
var file = this.allureRuntime.writeAttachment(step.argument.content, allure_js_commons_1.ContentType.TEXT);
const file = this.allureRuntime.writeAttachment(step.argument.content, allure_js_commons_1.ContentType.TEXT);
allureStep.addAttachment("Text", allure_js_commons_1.ContentType.TEXT, file);
}
if (step.argument.rows !== undefined) {
var file = this.allureRuntime.writeAttachment(step.argument.rows.map(function (row) { return row.cells.map(function (cell) { return cell.value.replace(/\t/g, " "); }).join("\t"); }).join("\n"), allure_js_commons_1.ContentType.TSV);
const file = this.allureRuntime.writeAttachment(step.argument.rows.map(row => row.cells.map(cell => cell.value.replace(/\t/g, " ")).join("\t")).join("\n"), allure_js_commons_1.ContentType.TSV);
allureStep.addAttachment("Table", allure_js_commons_1.ContentType.TSV, file);
}
}
};
CucumberJSAllureFormatter.prototype.onTestStepAttachment = function (data) {
}
onTestStepAttachment(data) {
if (this.currentStep === null)
throw new Error("There is no step to add attachment to");
var type = data.media.type;
var content = data.data;
const type = data.media.type;
let content = data.data;
if ([allure_js_commons_1.ContentType.JPEG, allure_js_commons_1.ContentType.PNG, allure_js_commons_1.ContentType.WEBM].indexOf(type) >= 0) {
content = Buffer.from(content, "base64");
}
var file = this.allureRuntime.writeAttachment(content, type);
const file = this.allureRuntime.writeAttachment(content, type);
this.currentStep.addAttachment("attached", type, file);
};
CucumberJSAllureFormatter.prototype.onTestStepFinished = function (data) {
var currentStep = this.currentStep;
}
onTestStepFinished(data) {
const currentStep = this.currentStep;
if (currentStep === null)

@@ -284,4 +247,4 @@ throw new Error("No current step defined");

this.popStep();
};
CucumberJSAllureFormatter.prototype.onTestCaseFinished = function (data) {
}
onTestCaseFinished(data) {
if (this.currentTest === null || this.currentGroup === null) {

@@ -295,4 +258,4 @@ throw new Error("No current test info");

this.currentGroup.endGroup();
};
CucumberJSAllureFormatter.prototype.setException = function (target, exception) {
}
setException(target, exception) {
if (exception !== undefined) {

@@ -308,27 +271,22 @@ if (typeof exception === "string") {

}
};
CucumberJSAllureFormatter.prototype.pushStep = function (step) {
}
pushStep(step) {
this.stepStack.push(step);
};
CucumberJSAllureFormatter.prototype.popStep = function () {
}
popStep() {
this.stepStack.pop();
};
Object.defineProperty(CucumberJSAllureFormatter.prototype, "currentStep", {
get: function () {
if (this.stepStack.length > 0)
return this.stepStack[this.stepStack.length - 1];
return null;
},
enumerable: true,
configurable: true
});
CucumberJSAllureFormatter.prototype.writeAttachment = function (content, type) {
}
get currentStep() {
if (this.stepStack.length > 0)
return this.stepStack[this.stepStack.length - 1];
return null;
}
writeAttachment(content, type) {
return this.allureRuntime.writeAttachment(content, type);
};
CucumberJSAllureFormatter.prototype.getGlobalInfoWriter = function () {
}
getGlobalInfoWriter() {
return this.allureRuntime;
};
return CucumberJSAllureFormatter;
}(cucumber_1.Formatter));
}
}
exports.CucumberJSAllureFormatter = CucumberJSAllureFormatter;
//# sourceMappingURL=CucumberJSAllureReporter.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Example = (function () {
function Example() {
class Example {
constructor() {
this.line = 0;
this.arguments = {};
}
return Example;
}());
}
exports.Example = Example;
function examplesToSensibleFormat(examples) {
var result = [];
for (var _i = 0, examples_1 = examples; _i < examples_1.length; _i++) {
var table = examples_1[_i];
for (var _a = 0, _b = table.tableBody || []; _a < _b.length; _a++) {
var row = _b[_a];
var item = new Example();
const result = [];
for (const table of examples) {
for (const row of table.tableBody || []) {
const item = new Example();
item.line = row.location.line;
for (var i = 0; i < row.cells.length; i++) {
for (let i = 0; i < row.cells.length; i++) {
item.arguments[table.tableHeader.cells[i].value] = row.cells[i].value;

@@ -21,0 +18,0 @@ }

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var GherkinDocument = (function () {
function GherkinDocument() {
class GherkinDocument {
constructor() {
this.comments = [];
}
return GherkinDocument;
}());
}
exports.GherkinDocument = GherkinDocument;
//# sourceMappingURL=GherkinDocument.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var GherkinExample = (function () {
function GherkinExample() {
}
return GherkinExample;
}());
class GherkinExample {
}
exports.GherkinExample = GherkinExample;
//# sourceMappingURL=GherkinExample.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var GherkinStep = (function () {
function GherkinStep() {
}
return GherkinStep;
}());
class GherkinStep {
}
exports.GherkinStep = GherkinStep;
//# sourceMappingURL=GherkinStep.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var GherkinTestCase = (function () {
function GherkinTestCase() {
class GherkinTestCase {
constructor() {
this.steps = [];
this.stepMap = new Map();
}
return GherkinTestCase;
}());
}
exports.GherkinTestCase = GherkinTestCase;
//# sourceMappingURL=GherkinTestCase.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Result = (function () {
function Result() {
}
return Result;
}());
class Result {
}
exports.Result = Result;
//# sourceMappingURL=Result.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var SourceLocation = (function () {
function SourceLocation() {
class SourceLocation {
static toKey(s) {
return `${s.sourceLocation.uri}:${s.sourceLocation.line}`;
}
SourceLocation.toKey = function (s) {
return s.sourceLocation.uri + ":" + s.sourceLocation.line;
};
return SourceLocation;
}());
}
exports.SourceLocation = SourceLocation;
//# sourceMappingURL=SourceLocation.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var allure_js_commons_1 = require("allure-js-commons");
var crypto_1 = require("crypto");
const allure_js_commons_1 = require("allure-js-commons");
const crypto_1 = require("crypto");
function statusTextToAllure(status) {

@@ -32,6 +32,6 @@ if (status === "passed")

return text;
for (var argName in example.arguments) {
for (const argName in example.arguments) {
if (!example.arguments.hasOwnProperty(argName))
continue;
text = text.replace(new RegExp("<" + argName + ">", "g"), "<" + example.arguments[argName] + ">");
text = text.replace(new RegExp(`<${argName}>`, "g"), `<${example.arguments[argName]}>`);
}

@@ -42,6 +42,6 @@ return text;

function stripIndent(data) {
var match = data.match(/^[^\S\n]*(?=\S)/gm);
const match = data.match(/^[^\S\n]*(?=\S)/gm);
if (match !== null) {
var indent = Math.min.apply(Math, match.map(function (sp) { return sp.length; }));
return data.replace(new RegExp("^.{" + indent + "}", "gm"), "");
const indent = Math.min(...match.map(sp => sp.length));
return data.replace(new RegExp(`^.{${indent}}`, "gm"), "");
}

@@ -48,0 +48,0 @@ return data;

@@ -189,3 +189,3 @@ Apache License

Copyright 2018 Qameta Software
Copyright 2019 Qameta Software

@@ -192,0 +192,0 @@ Licensed under the Apache License, Version 2.0 (the "License");

{
"name": "allure-cucumberjs",
"version": "2.0.0-beta.2",
"version": "2.0.0-beta.3",
"description": "Allure Cucumber.JS integration",

@@ -30,5 +30,5 @@ "license": "Apache-2.0",

"dependencies": {
"allure-js-commons": "^2.0.0-beta.2"
"allure-js-commons": "^2.0.0-beta.3"
},
"gitHead": "3fa87a0342b7920642642c6afb3091077e5296f4"
"gitHead": "600e5dacbc6587d3d2994b26c44e5dbf2e6f2099"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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