jest-allure2-adapter
Advanced tools
Comparing version 0.2.4 to 0.2.5
@@ -65,2 +65,4 @@ "use strict"; | ||
startGroup(name) { | ||
// todo check currentgroup.startgroup | ||
// todo check empty name | ||
this.runningGroup = this.runtime.startGroup(name); | ||
@@ -78,5 +80,8 @@ let nameGr = name; | ||
} | ||
// todo remove - change name someway | ||
// todo decorators | ||
startTest(spec) { | ||
this.runningTest = this.currentGroup.startTest(spec.description); | ||
this.runningTest.fullName = spec.fullName; | ||
// Capture Jest worker thread for timeline report | ||
if (process.env.JEST_WORKER_ID) { | ||
@@ -94,2 +99,3 @@ this.currentTest.addLabel(allure_js_commons_1.LabelName.THREAD, `${process.env.JEST_WORKER_ID}`); | ||
endStep(status, stage, end) { | ||
// console.log('END:' + JSON.stringify(this.stepNameStack)); | ||
const step = this.stepStack.pop(); | ||
@@ -99,2 +105,3 @@ this.stepNameStack.pop(); | ||
console.log('No step started'); | ||
// throw new Error('No step started'); | ||
return; | ||
@@ -115,2 +122,3 @@ } | ||
const replaceDot = (name) => { | ||
// todo regexp with \s | ||
if (name.substr(0, 1) === '.') { | ||
@@ -140,2 +148,3 @@ return name.substr(1, name.length - 1); | ||
} | ||
// todo type | ||
endTest(spec) { | ||
@@ -163,2 +172,3 @@ this.endSteps(); | ||
} | ||
// Capture exceptions | ||
const exceptionInfo = this.findMessageAboutThrow(spec.failedExpectations) || | ||
@@ -259,2 +269,13 @@ this.findAnyError(spec.failedExpectations); | ||
logStep(name, status, attachments) { | ||
// console.log('AllureImpl status:', status); | ||
/*const wrappedStep = this.startStep(name); | ||
if (attachments) { | ||
for (const {name, content, type} of attachments) { | ||
this.attachment(name, content, type); | ||
} | ||
} | ||
wrappedStep.logStep(status); | ||
wrappedStep.endStep();*/ | ||
} | ||
@@ -296,2 +317,8 @@ attachment(name, content, type) { | ||
var _a; | ||
// todo config | ||
/* options.url ?? | ||
(this.config?.issueUri ? this.config.issueUri(options.id) : undefined);*/ | ||
/*if (!url) { | ||
throw new Error('Specify url or issueUri in config'); | ||
}*/ | ||
const link = `${options.url}${options.id}`; | ||
@@ -303,2 +330,9 @@ this.issue((_a = options.name) !== null && _a !== void 0 ? _a : options.id, link); | ||
var _a; | ||
// todo config | ||
// 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'); | ||
}*/ | ||
const link = `${options.url}${options.id}`; | ||
@@ -366,2 +400,1 @@ this.tms((_a = options.name) !== null && _a !== void 0 ? _a : options.id, link); | ||
exports.AllureReporter = AllureReporter; | ||
//# sourceMappingURL=AllureReporter.js.map |
@@ -22,2 +22,1 @@ "use strict"; | ||
module.exports = JestAllureReporter; | ||
//# sourceMappingURL=index.js.map |
@@ -5,2 +5,3 @@ "use strict"; | ||
const path_1 = require("path"); | ||
// export const Categories: Category[] = []; // todo check may not work | ||
class JasmineAllureReporter { | ||
@@ -15,2 +16,3 @@ constructor(allure) { | ||
else { | ||
// case for tests without suite | ||
this.allure.startGroup(path_1.relative(process.cwd(), expect.getState().testPath)); | ||
@@ -30,2 +32,1 @@ } | ||
exports.JasmineAllureReporter = JasmineAllureReporter; | ||
//# sourceMappingURL=JasmineAllureReporter.js.map |
@@ -11,3 +11,12 @@ "use strict"; | ||
exports.registerAllureReporter = registerAllureReporter; | ||
/* | ||
export function addReporter( | ||
jasmineCustom?: (r: AllureReporter) => jasmine.CustomReporter, | ||
) { | ||
// const reporter = ((global as any).reporter = new AllureReporter()); | ||
jasmine | ||
.getEnv() | ||
.addReporter(jasmineCustom ?? new JasmineAllureReporter(reporter)); | ||
} | ||
*/ | ||
registerAllureReporter(); | ||
//# sourceMappingURL=setup.js.map |
{ | ||
"name": "jest-allure2-adapter", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "Allure 2 Adapter for jest", | ||
"main": "./dist/index.js", | ||
"main": "index", | ||
"types": "index.d.ts", | ||
"repository": "git@github.com:mmisty/jest-allure2-adapter.git", | ||
@@ -7,0 +8,0 @@ "publishConfig": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
597
27704
10