@saucelabs/cucumber-reporter
Advanced tools
Comparing version 0.2.0 to 0.3.0
{ | ||
"name": "@saucelabs/cucumber-reporter", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Reports your tests to Sauce Labs", | ||
@@ -5,0 +5,0 @@ "main": "src/reporter.js", |
@@ -48,3 +48,2 @@ "use strict"; | ||
this.outputFile = reporterConfig?.outputFile || 'sauce-test-report.json'; | ||
this.shouldUpload = reporterConfig?.upload !== false; | ||
this.cucumberVersion = 'unknown'; | ||
@@ -56,2 +55,7 @@ this.testRun = new sauce_json_reporter_1.TestRun(); | ||
this.startedAt = new Date().toISOString(); | ||
this.shouldUpload = reporterConfig?.upload !== false; | ||
// skip uploading report when it's on sauce VM | ||
if (process.env.SAUCE_VM) { | ||
this.shouldUpload = false; | ||
} | ||
let reporterVersion = 'unknown'; | ||
@@ -132,2 +136,5 @@ try { | ||
this.reportToFile(this.testRun); | ||
if (!this.shouldUpload) { | ||
return; | ||
} | ||
const id = await this.reportToSauce(); | ||
@@ -174,9 +181,7 @@ this.logSauceJob(id); | ||
}; | ||
if (this.shouldUpload) { | ||
const sessionID = await this.createJob(jobBody); | ||
if (sessionID) { | ||
await this.uploadAssets(sessionID); | ||
} | ||
return sessionID; | ||
const sessionID = await this.createJob(jobBody); | ||
if (sessionID) { | ||
await this.uploadAssets(sessionID); | ||
} | ||
return sessionID; | ||
} | ||
@@ -183,0 +188,0 @@ async uploadAssets(sessionId) { |
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
17056
279
15