Socket
Socket
Sign inDemoInstall

allure-js-commons

Package Overview
Dependencies
Maintainers
3
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

allure-js-commons - npm Package Compare versions

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

8

dist/src/AllureConfig.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var AllureConfig = (function () {
function AllureConfig(resultsDir, testMapper) {
if (resultsDir === void 0) { resultsDir = "allure-results"; }
class AllureConfig {
constructor(resultsDir = "allure-results", testMapper) {
this.resultsDir = resultsDir;
this.testMapper = testMapper;
}
return AllureConfig;
}());
}
exports.AllureConfig = AllureConfig;
//# sourceMappingURL=AllureConfig.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var TestResultContainer_1 = require("./entities/TestResultContainer");
var Link_1 = require("./entities/Link");
var ExecutableItem_1 = require("./entities/ExecutableItem");
var ExecutableItemWrapper_1 = require("./ExecutableItemWrapper");
var AllureTest_1 = require("./AllureTest");
var AllureGroup = (function () {
function AllureGroup(runtime, parent) {
const TestResultContainer_1 = require("./entities/TestResultContainer");
const Link_1 = require("./entities/Link");
const ExecutableItem_1 = require("./entities/ExecutableItem");
const ExecutableItemWrapper_1 = require("./ExecutableItemWrapper");
const AllureTest_1 = require("./AllureTest");
class AllureGroup {
constructor(runtime, parent) {
this.runtime = runtime;

@@ -15,65 +15,48 @@ this.parent = parent;

}
AllureGroup.prototype.startGroup = function (name) {
var group = new AllureGroup(this.runtime, this);
startGroup(name) {
const group = new AllureGroup(this.runtime, this);
this.testResultContainer.children.push(group.uuid);
group.name = name || "Unnamed";
return group;
};
AllureGroup.prototype.startTest = function (name) {
var test = new AllureTest_1.AllureTest(this.runtime, this);
}
startTest(name) {
const test = new AllureTest_1.AllureTest(this.runtime, this);
this.testResultContainer.children.push(test.uuid);
test.name = name || "Unnamed";
return test;
};
AllureGroup.prototype.endGroup = function () {
}
endGroup() {
this.testResultContainer.stop = Date.now();
this.runtime.writeGroup(this.testResultContainer);
};
Object.defineProperty(AllureGroup.prototype, "uuid", {
get: function () {
return this.testResultContainer.uuid;
},
enumerable: true,
configurable: true
});
Object.defineProperty(AllureGroup.prototype, "name", {
get: function () {
return this.testResultContainer.name || "";
},
set: function (name) {
this.testResultContainer.name = name;
},
enumerable: true,
configurable: true
});
Object.defineProperty(AllureGroup.prototype, "description", {
set: function (description) {
this.testResultContainer.description = description;
},
enumerable: true,
configurable: true
});
Object.defineProperty(AllureGroup.prototype, "descriptionHtml", {
set: function (descriptionHtml) {
this.testResultContainer.descriptionHtml = descriptionHtml;
},
enumerable: true,
configurable: true
});
AllureGroup.prototype.addLink = function (name, url, type) {
}
get uuid() {
return this.testResultContainer.uuid;
}
get name() {
return this.testResultContainer.name || "";
}
set name(name) {
this.testResultContainer.name = name;
}
set description(description) {
this.testResultContainer.description = description;
}
set descriptionHtml(descriptionHtml) {
this.testResultContainer.descriptionHtml = descriptionHtml;
}
addLink(name, url, type) {
this.testResultContainer.links.push(new Link_1.Link(name, url, type));
};
AllureGroup.prototype.addBefore = function () {
var result = new ExecutableItem_1.ExecutableItem();
}
addBefore() {
const result = new ExecutableItem_1.ExecutableItem();
this.testResultContainer.befores.push(result);
return new ExecutableItemWrapper_1.ExecutableItemWrapper(result);
};
AllureGroup.prototype.addAfter = function () {
var result = new ExecutableItem_1.ExecutableItem();
}
addAfter() {
const result = new ExecutableItem_1.ExecutableItem();
this.testResultContainer.afters.push(result);
return new ExecutableItemWrapper_1.ExecutableItemWrapper(result);
};
return AllureGroup;
}());
}
}
exports.AllureGroup = AllureGroup;
//# sourceMappingURL=AllureGroup.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var LabelName_1 = require("./entities/LabelName");
var AllureInterface = (function () {
function AllureInterface() {
const LabelName_1 = require("./entities/LabelName");
class AllureInterface {
createStep(name, stepFunction) {
return (...args) => this.step(name, () => stepFunction.apply(this, args));
}
AllureInterface.prototype.createStep = function (name, stepFunction) {
var _this = this;
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
return _this.step(name, function () { return stepFunction.apply(_this, args); });
};
};
AllureInterface.prototype.createAttachment = function (name, content, type) {
var _this = this;
createAttachment(name, content, type) {
if (typeof content === "function") {
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
_this.attachment(name, content.apply(_this, args), type);
return (...args) => {
this.attachment(name, content.apply(this, args), type);
};

@@ -31,27 +17,26 @@ }

}
};
AllureInterface.prototype.addArgument = function (name, value) {
}
addArgument(name, value) {
this.addParameter(name, value);
};
AllureInterface.prototype.addEnvironment = function (name, value) {
this.addParameter("ENV[" + name + "]", value);
};
AllureInterface.prototype.description = function (description, type) {
}
addEnvironment(name, value) {
this.addParameter(`ENV[${name}]`, value);
}
description(description, type) {
this.setDescription(description);
};
AllureInterface.prototype.severity = function (severity) {
}
severity(severity) {
this.addLabel(LabelName_1.LabelName.SEVERITY, severity);
};
AllureInterface.prototype.epic = function (epic) {
}
epic(epic) {
this.addLabel(LabelName_1.LabelName.EPIC, epic);
};
AllureInterface.prototype.feature = function (feature) {
}
feature(feature) {
this.addLabel(LabelName_1.LabelName.FEATURE, feature);
};
AllureInterface.prototype.story = function (story) {
}
story(story) {
this.addLabel(LabelName_1.LabelName.STORY, story);
};
return AllureInterface;
}());
}
}
exports.AllureInterface = AllureInterface;
//# sourceMappingURL=AllureInterface.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var fs_1 = require("fs");
var mkdirp_1 = require("mkdirp");
var path_1 = require("path");
var uuid_1 = require("uuid");
var properties_1 = require("properties");
var ContentType_1 = require("./entities/ContentType");
var AllureGroup_1 = require("./AllureGroup");
var AllureRuntime = (function () {
function AllureRuntime(config) {
const fs_1 = require("fs");
const mkdirp_1 = require("mkdirp");
const path_1 = require("path");
const uuid_1 = require("uuid");
const properties_1 = require("properties");
const ContentType_1 = require("./entities/ContentType");
const AllureGroup_1 = require("./AllureGroup");
class AllureRuntime {
constructor(config) {
this.config = config;

@@ -16,38 +16,38 @@ if (!fs_1.existsSync(this.config.resultsDir))

}
AllureRuntime.prototype.startGroup = function (name) {
var allureContainer = new AllureGroup_1.AllureGroup(this);
startGroup(name) {
const allureContainer = new AllureGroup_1.AllureGroup(this);
allureContainer.name = name || "Unnamed";
return allureContainer;
};
AllureRuntime.prototype.writeResult = function (result) {
var modifiedResult = this.config.testMapper !== undefined ? this.config.testMapper(result) : result;
}
writeResult(result) {
const modifiedResult = this.config.testMapper !== undefined ? this.config.testMapper(result) : result;
if (modifiedResult != null) {
var path = path_1.join(this.config.resultsDir, modifiedResult.uuid + "-result.json");
const path = path_1.join(this.config.resultsDir, `${modifiedResult.uuid}-result.json`);
fs_1.writeFileSync(path, JSON.stringify(modifiedResult), { encoding: "utf-8" });
}
};
AllureRuntime.prototype.writeGroup = function (result) {
var path = path_1.join(this.config.resultsDir, result.uuid + "-container.json");
}
writeGroup(result) {
const path = path_1.join(this.config.resultsDir, `${result.uuid}-container.json`);
fs_1.writeFileSync(path, JSON.stringify(result), { encoding: "utf-8" });
};
AllureRuntime.prototype.writeAttachment = function (content, contentType) {
var extension = ContentType_1.typeToExtension(contentType);
var fileName = uuid_1.v4() + "-attachment." + extension;
var path = path_1.join(this.config.resultsDir, fileName);
}
writeAttachment(content, contentType) {
const extension = ContentType_1.typeToExtension(contentType);
const fileName = `${uuid_1.v4()}-attachment.${extension}`;
const path = path_1.join(this.config.resultsDir, fileName);
fs_1.writeFileSync(path, content, { encoding: "utf-8" });
return fileName;
};
AllureRuntime.prototype.writeExecutorInfo = function (info) {
var path = path_1.join(this.config.resultsDir, "executor.json");
}
writeExecutorInfo(info) {
const path = path_1.join(this.config.resultsDir, "executor.json");
fs_1.writeFileSync(path, JSON.stringify(info), { encoding: "utf-8" });
};
AllureRuntime.prototype.writeEnvironmentInfo = function (info) {
var path = path_1.join(this.config.resultsDir, "environment.properties");
var target = info || process.env;
var text = properties_1.stringify(target, { unicode: true });
}
writeEnvironmentInfo(info) {
const path = path_1.join(this.config.resultsDir, "environment.properties");
const target = info || process.env;
const text = properties_1.stringify(target, { unicode: true });
fs_1.writeFileSync(path, text, { encoding: "utf-8" });
};
AllureRuntime.prototype.writeCategories = function (categories) {
var path = path_1.join(this.config.resultsDir, "categories.json");
fs_1.writeFileSync(path, JSON.stringify(categories.map(function (c) {
}
writeCategories(categories) {
const path = path_1.join(this.config.resultsDir, "categories.json");
fs_1.writeFileSync(path, JSON.stringify(categories.map(c => {
if (c.messageRegex instanceof RegExp)

@@ -59,6 +59,5 @@ c.messageRegex = c.messageRegex.source;

})), { encoding: "utf-8" });
};
return AllureRuntime;
}());
}
}
exports.AllureRuntime = AllureRuntime;
//# sourceMappingURL=AllureRuntime.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 __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var ExecutableItemWrapper_1 = require("./ExecutableItemWrapper");
var TestResult_1 = require("./entities/TestResult");
var Label_1 = require("./entities/Label");
var Link_1 = require("./entities/Link");
var AllureTest = (function (_super) {
__extends(AllureTest, _super);
function AllureTest(runtime, parent) {
var _this = _super.call(this, new TestResult_1.TestResult()) || this;
_this.runtime = runtime;
_this.parent = parent;
_this.testResult = _this.wrappedItem;
_this.testResult.start = Date.now();
return _this;
const ExecutableItemWrapper_1 = require("./ExecutableItemWrapper");
const TestResult_1 = require("./entities/TestResult");
const Label_1 = require("./entities/Label");
const Link_1 = require("./entities/Link");
class AllureTest extends ExecutableItemWrapper_1.ExecutableItemWrapper {
constructor(runtime, parent) {
super(new TestResult_1.TestResult());
this.runtime = runtime;
this.parent = parent;
this.testResult = this.wrappedItem;
this.testResult.start = Date.now();
}
AllureTest.prototype.endTest = function () {
endTest() {
this.testResult.stop = Date.now();
this.runtime.writeResult(this.testResult);
};
Object.defineProperty(AllureTest.prototype, "uuid", {
get: function () {
return this.testResult.uuid;
},
enumerable: true,
configurable: true
});
Object.defineProperty(AllureTest.prototype, "historyId", {
set: function (id) {
this.testResult.historyId = id;
},
enumerable: true,
configurable: true
});
Object.defineProperty(AllureTest.prototype, "fullName", {
set: function (fullName) {
this.testResult.fullName = fullName;
},
enumerable: true,
configurable: true
});
AllureTest.prototype.addLabel = function (name, value) {
}
get uuid() {
return this.testResult.uuid;
}
set historyId(id) {
this.testResult.historyId = id;
}
set fullName(fullName) {
this.testResult.fullName = fullName;
}
addLabel(name, value) {
this.testResult.labels.push(new Label_1.Label(name, value));
};
AllureTest.prototype.addLink = function (name, url, type) {
}
addLink(name, url, type) {
this.testResult.links.push(new Link_1.Link(name, url, type));
};
return AllureTest;
}(ExecutableItemWrapper_1.ExecutableItemWrapper));
}
}
exports.AllureTest = AllureTest;
//# sourceMappingURL=AllureTest.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Attachment = (function () {
function Attachment(name, type, source) {
class Attachment {
constructor(name, type, source) {
this.name = name;

@@ -9,5 +9,4 @@ this.type = type;

}
return Attachment;
}());
}
exports.Attachment = Attachment;
//# sourceMappingURL=Attachment.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Category = (function () {
function Category() {
class Category {
constructor() {
this.matchedStatuses = [];
}
return Category;
}());
}
exports.Category = Category;
//# sourceMappingURL=Category.js.map

@@ -42,5 +42,5 @@ "use strict";

}
throw new Error("Unrecognized extension: " + type);
throw new Error(`Unrecognized extension: ${type}`);
}
exports.typeToExtension = typeToExtension;
//# sourceMappingURL=ContentType.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Status_1 = require("./Status");
var StatusDetails_1 = require("./StatusDetails");
var Stage_1 = require("./Stage");
var ExecutableItem = (function () {
function ExecutableItem() {
const Status_1 = require("./Status");
const StatusDetails_1 = require("./StatusDetails");
const Stage_1 = require("./Stage");
class ExecutableItem {
constructor() {
this.status = Status_1.Status.BROKEN;

@@ -15,5 +15,4 @@ this.statusDetails = new StatusDetails_1.StatusDetails();

}
return ExecutableItem;
}());
}
exports.ExecutableItem = ExecutableItem;
//# sourceMappingURL=ExecutableItem.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var ExecutorInfo = (function () {
function ExecutorInfo() {
}
return ExecutorInfo;
}());
class ExecutorInfo {
}
exports.ExecutorInfo = ExecutorInfo;
//# sourceMappingURL=ExecutorInfo.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Label = (function () {
function Label(name, value) {
class Label {
constructor(name, value) {
this.name = name;
this.value = value;
}
return Label;
}());
}
exports.Label = Label;
//# sourceMappingURL=Label.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Link = (function () {
function Link(name, url, type) {
class Link {
constructor(name, url, type) {
this.name = name;

@@ -9,5 +9,4 @@ this.url = url;

}
return Link;
}());
}
exports.Link = Link;
//# sourceMappingURL=Link.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Parameter = (function () {
function Parameter(name, value) {
class Parameter {
constructor(name, value) {
this.name = name;
this.value = value;
}
return Parameter;
}());
}
exports.Parameter = Parameter;
//# sourceMappingURL=Parameter.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var StatusDetails = (function () {
function StatusDetails() {
}
return StatusDetails;
}());
class StatusDetails {
}
exports.StatusDetails = StatusDetails;
//# sourceMappingURL=StatusDetails.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 __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var ExecutableItem_1 = require("./ExecutableItem");
var uuid_1 = require("uuid");
var TestResult = (function (_super) {
__extends(TestResult, _super);
function TestResult() {
var _this = _super.call(this) || this;
_this.labels = [];
_this.links = [];
_this.uuid = uuid_1.v4();
_this.historyId = uuid_1.v4();
return _this;
const ExecutableItem_1 = require("./ExecutableItem");
const uuid_1 = require("uuid");
class TestResult extends ExecutableItem_1.ExecutableItem {
constructor() {
super();
this.labels = [];
this.links = [];
this.uuid = uuid_1.v4();
this.historyId = uuid_1.v4();
}
return TestResult;
}(ExecutableItem_1.ExecutableItem));
}
exports.TestResult = TestResult;
//# sourceMappingURL=TestResult.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var uuid_1 = require("uuid");
var TestResultContainer = (function () {
function TestResultContainer() {
const uuid_1 = require("uuid");
class TestResultContainer {
constructor() {
this.children = [];

@@ -12,5 +12,4 @@ this.befores = [];

}
return TestResultContainer;
}());
}
exports.TestResultContainer = TestResultContainer;
//# sourceMappingURL=TestResultContainer.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 __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var ExecutableItem_1 = require("./entities/ExecutableItem");
var Status_1 = require("./entities/Status");
var Stage_1 = require("./entities/Stage");
var Parameter_1 = require("./entities/Parameter");
var Attachment_1 = require("./entities/Attachment");
var isPromise_1 = require("./isPromise");
var ExecutableItemWrapper = (function () {
function ExecutableItemWrapper(info) {
const ExecutableItem_1 = require("./entities/ExecutableItem");
const Status_1 = require("./entities/Status");
const Stage_1 = require("./entities/Stage");
const Parameter_1 = require("./entities/Parameter");
const Attachment_1 = require("./entities/Attachment");
const isPromise_1 = require("./isPromise");
class ExecutableItemWrapper {
constructor(info) {
this.info = info;
}
Object.defineProperty(ExecutableItemWrapper.prototype, "wrappedItem", {
get: function () {
return this.info;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ExecutableItemWrapper.prototype, "name", {
set: function (name) {
this.info.name = name;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ExecutableItemWrapper.prototype, "description", {
set: function (description) {
this.info.description = description;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ExecutableItemWrapper.prototype, "descriptionHtml", {
set: function (descriptionHtml) {
this.info.descriptionHtml = descriptionHtml;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ExecutableItemWrapper.prototype, "status", {
set: function (status) {
this.info.status = status;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ExecutableItemWrapper.prototype, "statusDetails", {
set: function (details) {
this.info.statusDetails = details;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ExecutableItemWrapper.prototype, "detailsMessage", {
set: function (message) {
this.info.statusDetails.message = message;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ExecutableItemWrapper.prototype, "detailsTrace", {
set: function (trace) {
this.info.statusDetails.trace = trace;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ExecutableItemWrapper.prototype, "detailsMuted", {
set: function (muted) {
this.info.statusDetails.muted = muted;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ExecutableItemWrapper.prototype, "detailsKnown", {
set: function (known) {
this.info.statusDetails.known = known;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ExecutableItemWrapper.prototype, "detailsFlaky", {
set: function (flaky) {
this.info.statusDetails.flaky = flaky;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ExecutableItemWrapper.prototype, "stage", {
set: function (stage) {
this.info.stage = stage;
},
enumerable: true,
configurable: true
});
ExecutableItemWrapper.prototype.addParameter = function (name, value) {
get wrappedItem() {
return this.info;
}
set name(name) {
this.info.name = name;
}
set description(description) {
this.info.description = description;
}
set descriptionHtml(descriptionHtml) {
this.info.descriptionHtml = descriptionHtml;
}
set status(status) {
this.info.status = status;
}
set statusDetails(details) {
this.info.statusDetails = details;
}
set detailsMessage(message) {
this.info.statusDetails.message = message;
}
set detailsTrace(trace) {
this.info.statusDetails.trace = trace;
}
set detailsMuted(muted) {
this.info.statusDetails.muted = muted;
}
set detailsKnown(known) {
this.info.statusDetails.known = known;
}
set detailsFlaky(flaky) {
this.info.statusDetails.flaky = flaky;
}
set stage(stage) {
this.info.stage = stage;
}
addParameter(name, value) {
this.info.parameters.push(new Parameter_1.Parameter(name, value));
};
ExecutableItemWrapper.prototype.addAttachment = function (name, type, fileName) {
}
addAttachment(name, type, fileName) {
this.info.attachments.push(new Attachment_1.Attachment(name, type, fileName));
};
ExecutableItemWrapper.prototype.startStep = function (name) {
var stepResult = new ExecutableItem_1.ExecutableItem();
}
startStep(name) {
const stepResult = new ExecutableItem_1.ExecutableItem();
this.info.steps.push(stepResult);
var allureStep = new AllureStep(stepResult);
const allureStep = new AllureStep(stepResult);
allureStep.name = name;
return allureStep;
};
ExecutableItemWrapper.prototype.wrap = function (fun) {
var _this = this;
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
_this.stage = Stage_1.Stage.RUNNING;
var result;
}
wrap(fun) {
return (...args) => {
this.stage = Stage_1.Stage.RUNNING;
let result;
try {

@@ -136,7 +70,7 @@ result = fun(args);

catch (error) {
_this.stage = Stage_1.Stage.INTERRUPTED;
_this.status = Status_1.Status.BROKEN;
this.stage = Stage_1.Stage.INTERRUPTED;
this.status = Status_1.Status.BROKEN;
if (error) {
_this.detailsMessage = error.message || "";
_this.detailsTrace = error.stack || "";
this.detailsMessage = error.message || "";
this.detailsTrace = error.stack || "";
}

@@ -146,13 +80,13 @@ throw error;

if (isPromise_1.isPromise(result)) {
var promise = result;
return promise.then(function (res) {
_this.status = Status_1.Status.PASSED;
_this.stage = Stage_1.Stage.FINISHED;
const promise = result;
return promise.then(res => {
this.status = Status_1.Status.PASSED;
this.stage = Stage_1.Stage.FINISHED;
return res;
}).catch(function (error) {
_this.stage = Stage_1.Stage.INTERRUPTED;
_this.status = Status_1.Status.BROKEN;
}).catch(error => {
this.stage = Stage_1.Stage.INTERRUPTED;
this.status = Status_1.Status.BROKEN;
if (error) {
_this.detailsMessage = error.message || "";
_this.detailsTrace = error.stack || "";
this.detailsMessage = error.message || "";
this.detailsTrace = error.stack || "";
}

@@ -163,25 +97,21 @@ throw error;

else {
_this.status = Status_1.Status.PASSED;
_this.stage = Stage_1.Stage.FINISHED;
this.status = Status_1.Status.PASSED;
this.stage = Stage_1.Stage.FINISHED;
return result;
}
};
};
return ExecutableItemWrapper;
}());
}
}
exports.ExecutableItemWrapper = ExecutableItemWrapper;
var AllureStep = (function (_super) {
__extends(AllureStep, _super);
function AllureStep(stepResult) {
var _this = _super.call(this, stepResult) || this;
_this.stepResult = stepResult;
_this.stepResult.start = Date.now();
return _this;
class AllureStep extends ExecutableItemWrapper {
constructor(stepResult) {
super(stepResult);
this.stepResult = stepResult;
this.stepResult.start = Date.now();
}
AllureStep.prototype.endStep = function () {
endStep() {
this.stepResult.stop = Date.now();
};
return AllureStep;
}(ExecutableItemWrapper));
}
}
exports.AllureStep = AllureStep;
//# sourceMappingURL=ExecutableItemWrapper.js.map

@@ -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-js-commons",
"version": "2.0.0-beta.2",
"version": "2.0.0-beta.3",
"description": "Allure JS Commons",

@@ -27,3 +27,3 @@ "license": "Apache-2.0",

},
"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

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