@empiricalrun/reporter
Advanced tools
Comparing version 0.11.1 to 0.11.2
# @empiricalrun/reporter | ||
## 0.11.2 | ||
### Patch Changes | ||
- 1c3fb96: feat: show build-url in google chat messages | ||
## 0.11.1 | ||
@@ -4,0 +10,0 @@ |
@@ -15,3 +15,4 @@ import { BaseReportSource } from "../sources/base"; | ||
private summaryString; | ||
private sanitizeBuildUrl; | ||
} | ||
//# sourceMappingURL=google.d.ts.map |
@@ -18,5 +18,9 @@ "use strict"; | ||
const title = "Tests started"; | ||
const subtitle = process.env.BUILD_URL | ||
? this.sanitizeBuildUrl(process.env.BUILD_URL) | ||
: undefined; | ||
const card = { | ||
header: { | ||
title, | ||
subtitle, | ||
}, | ||
@@ -49,5 +53,9 @@ sections: [ | ||
const title = "Tests were not run"; | ||
const subtitle = process.env.BUILD_URL | ||
? this.sanitizeBuildUrl(process.env.BUILD_URL) | ||
: undefined; | ||
const card = { | ||
header: { | ||
title, | ||
subtitle, | ||
}, | ||
@@ -206,10 +214,17 @@ sections: [ | ||
const { hasPassed, totalTests, failedTests } = results; | ||
const buildUrl = process.env.BUILD_URL | ||
? this.sanitizeBuildUrl(process.env.BUILD_URL) | ||
: undefined; | ||
const buildUrlSuffix = buildUrl ? `on ${buildUrl}` : ""; | ||
if (hasPassed) { | ||
return "All passed"; | ||
return `All passed ${buildUrlSuffix}`; | ||
} | ||
else if (failedTests > 0) { | ||
return `${failedTests} failed out of ${totalTests} tests`; | ||
return `${failedTests} failed out of ${totalTests} tests ${buildUrlSuffix}`; | ||
} | ||
} | ||
sanitizeBuildUrl(url) { | ||
return url.replace("https://", ""); | ||
} | ||
} | ||
exports.GoogleChatReportSink = GoogleChatReportSink; |
{ | ||
"name": "@empiricalrun/reporter", | ||
"version": "0.11.1", | ||
"version": "0.11.2", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "registry": "https://registry.npmjs.org/", |
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
65073
1438
15