jest-allure2-adapter
Advanced tools
Comparing version 0.1.18 to 0.1.19
/// <reference types="node" /> | ||
import { Allure, AllureGroup, AllureStep, AllureTest, Attachment, Category, ContentType, ExecutableItemWrapper, IAllureConfig, LinkType, Stage, Status, StepInterface, Severity } from 'allure-js-commons'; | ||
export declare const dateStr: () => string; | ||
export declare class AllureReporter extends Allure { | ||
@@ -4,0 +5,0 @@ private runningTest; |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.AllureReporter = void 0; | ||
exports.AllureReporter = exports.dateStr = void 0; | ||
const allure_js_commons_1 = require("allure-js-commons"); | ||
@@ -21,2 +21,18 @@ const strip_ansi_1 = __importDefault(require("strip-ansi")); | ||
})(SpecStatus || (SpecStatus = {})); | ||
exports.dateStr = () => { | ||
const date = new Date(Date.now()); | ||
return (date.getFullYear() + | ||
'-' + | ||
(date.getMonth() + 1) + | ||
'-' + | ||
date.getDate() + | ||
' ' + | ||
date.getUTCHours() + | ||
':' + | ||
date.getMinutes() + | ||
':' + | ||
date.getSeconds() + | ||
'.' + | ||
date.getMilliseconds()); | ||
}; | ||
class AllureReporter extends allure_js_commons_1.Allure { | ||
@@ -52,2 +68,3 @@ constructor(config) { | ||
// todo check currentgroup.startgroup | ||
// todo check empty name | ||
this.runningGroup = this.runtime.startGroup(name); | ||
@@ -77,3 +94,3 @@ let nameGr = name; | ||
startStep(name, start) { | ||
const allureStep = this.currentExecutable.startStep(name, start); | ||
const allureStep = this.currentExecutable.startStep(exports.dateStr() + ' | ' + name, start); | ||
this.stepStack.push(allureStep); | ||
@@ -80,0 +97,0 @@ this.stepNameStack.push(name); |
{ | ||
"name": "jest-allure2-adapter", | ||
"version": "0.1.18", | ||
"version": "0.1.19", | ||
"description": "Allure 2 Adapter for jest", | ||
@@ -5,0 +5,0 @@ "main": "dist/index", |
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
40457
945