allure-js-commons
Advanced tools
Comparing version 1.3.0 to 1.3.1
21
index.js
@@ -56,5 +56,11 @@ 'use strict'; | ||
suite = this.getCurrentSuite(); | ||
if (!suite || !suite.currentStep) { | ||
console.warn('allure-js-commons: Unexpected startStep() of ' + stepName + '. There is no parent step'); | ||
return; | ||
} | ||
step.parent = suite.currentStep; | ||
step.parent.addStep(step); | ||
suite.currentStep = step; | ||
}; | ||
@@ -64,6 +70,7 @@ | ||
var suite = this.getCurrentSuite(); | ||
if(!(suite.currentStep instanceof Step)) { | ||
console.warn('allure-js-commons: Unexpected endStep(). There is no any steps running'); | ||
if (!suite || !(suite.currentStep instanceof Step)) { | ||
console.warn('allure-js-commons: Unexpected endStep(). There are no any steps running'); | ||
return; | ||
} | ||
suite.currentStep.end(status, timestamp); | ||
@@ -80,4 +87,10 @@ suite.currentStep = suite.currentStep.parent; | ||
name = writer.writeBuffer(this.options.targetDir, buffer, info.ext), | ||
attachment = new Attachment(attachmentName, name, buffer.length, info.mime); | ||
this.getCurrentSuite().currentStep.addAttachment(attachment); | ||
attachment = new Attachment(attachmentName, name, buffer.length, info.mime), | ||
currentStep = this.getCurrentSuite().currentStep; | ||
if (currentStep) { | ||
currentStep.addAttachment(attachment); | ||
} else { | ||
console.warn('Trying to add attachment ' + attachmentName + ' to non-existent step'); | ||
} | ||
}; | ||
@@ -84,0 +97,0 @@ |
{ | ||
"name": "allure-js-commons", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "Common helper for writing plugins to allure-framework", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
2
14648
17
406