Skip to content

Commit 9bacb12

Browse files
Merge pull request #183 from contentstack/test/sanity-update
update sanity test slack message
2 parents e19a4df + ae411b4 commit 9bacb12

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

jest.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable */
22
export default {
3-
displayName: 'contentstack-delivery',
4-
preset: './jest.preset.js',
3+
displayName: "contentstack-delivery",
4+
preset: "./jest.preset.js",
55
transform: {
66
"^.+\\.[tj]s$": [
77
"ts-jest",

package-lock.json

Lines changed: 1 addition & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sanity-report.mjs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,16 @@ console.log(`Failed Tests: ${failedTests}`);
4444
console.log(`Skipped Tests: ${skippedTests}`);
4545
console.log(`Total Duration: ${totalDurationMinutes}m ${totalDurationSeconds.toFixed(0)}s`);
4646

47+
const host = process.env.HOST || ''
48+
let region = 'AWS-NA'
49+
50+
const match = host.match(/^([^-]+(?:-[^-]+)*)-cdn/)
51+
if (match && match[1]) {
52+
region = match[1].toUpperCase()
53+
}
54+
4755
const slackMessage = `
48-
*Typescript CDA Report*
56+
*Typescript CDA Report - ${region}*
4957
• Total Suites: *${totalSuites}*
5058
• Total Tests: *${totalTests}*
5159
• Passed Tests: *${passedTests}*

0 commit comments

Comments
 (0)