allure-playwright
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -39,3 +39,3 @@ "use strict"; | ||
this.suite = suite; | ||
this.resultsDir = allureReportFolder(this.options.outputFolder); | ||
this.resultsDir = (0, allure_js_commons_1.allureReportFolder)(this.options.outputFolder); | ||
this.allureRuntime = new allure_js_commons_1.AllureRuntime({ | ||
@@ -115,4 +115,4 @@ resultsDir: this.resultsDir, | ||
if (result.error) { | ||
const message = result.error.message && stripAscii(result.error.message); | ||
let trace = result.error.stack && stripAscii(result.error.stack); | ||
const message = result.error.message && (0, allure_js_commons_1.stripAscii)(result.error.message); | ||
let trace = result.error.stack && (0, allure_js_commons_1.stripAscii)(result.error.stack); | ||
if (trace && message && trace.startsWith(`Error: ${message}`)) { | ||
@@ -181,6 +181,6 @@ trace = trace.substr(message.length + "Error: ".length); | ||
if (result.stdout.length > 0) { | ||
allureTest.addAttachment("stdout", "text/plain", runtime.writeAttachment(stripAscii(result.stdout.join("")), "text/plain")); | ||
allureTest.addAttachment("stdout", "text/plain", runtime.writeAttachment((0, allure_js_commons_1.stripAscii)(result.stdout.join("")), "text/plain")); | ||
} | ||
if (result.stderr.length > 0) { | ||
allureTest.addAttachment("stderr", "text/plain", runtime.writeAttachment(stripAscii(result.stderr.join("")), "text/plain")); | ||
allureTest.addAttachment("stderr", "text/plain", runtime.writeAttachment((0, allure_js_commons_1.stripAscii)(result.stderr.join("")), "text/plain")); | ||
} | ||
@@ -275,6 +275,2 @@ allureTest.endTest(); | ||
exports.default = AllureReporter; | ||
const asciiRegex = new RegExp("[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))", "g"); | ||
const stripAscii = (str) => { | ||
return str.replace(asciiRegex, ""); | ||
}; | ||
const appendStep = (parent, step) => { | ||
@@ -288,15 +284,3 @@ const allureStep = parent.startStep(step.title, step.startTime.getTime()); | ||
}; | ||
const allureReportFolder = (outputFolder) => { | ||
if (process_1.default.env.ALLURE_RESULTS_DIR) { | ||
return path_1.default.resolve(process_1.default.cwd(), process_1.default.env.ALLURE_RESULTS_DIR); | ||
} | ||
if (outputFolder) { | ||
return outputFolder; | ||
} | ||
return defaultReportFolder(); | ||
}; | ||
const defaultReportFolder = () => { | ||
return path_1.default.resolve(process_1.default.cwd(), "allure-results"); | ||
}; | ||
__exportStar(require("./helpers"), exports); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "allure-playwright", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Allure Playwright integration", | ||
@@ -37,3 +37,3 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"allure-js-commons": "2.0.0" | ||
"allure-js-commons": "2.1.0" | ||
}, | ||
@@ -40,0 +40,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
42695
11
462
+ Addedallure-js-commons@2.1.0(transitive)
- Removedallure-js-commons@2.0.0(transitive)
Updatedallure-js-commons@2.1.0