jest-slack-integration
Advanced tools
Comparing version 1.0.13 to 1.0.14
48
index.js
@@ -19,6 +19,52 @@ const readPkg = require('read-pkg') | ||
const slackMessage = { | ||
text: text, | ||
attachments: [ | ||
{ | ||
fallback: 'Required plain-text summary of the attachment.', | ||
color: '#36a64f', | ||
title: 'Your Test Results Are In!', | ||
mrkdwn_in: ['text'], | ||
text: 'Here is a quick summary of the jest test results.. \nrun `jest` locally to see all the details \n..', | ||
fields: [ | ||
{ | ||
title: 'Total Tests Suites', | ||
value: testResults.numTotalTestSuites, | ||
short: false | ||
}, | ||
{ | ||
title: 'Total Tests', | ||
value: testResults.numTotalTests, | ||
short: false | ||
}, | ||
{ | ||
title: 'Test Suites Passing', | ||
value: testResults.numPassedTestSuites, | ||
short: false | ||
}, | ||
{ | ||
title: 'Test Suites Failing', | ||
value: testResults.numFailedTestSuites, | ||
short: false | ||
}, | ||
{ | ||
title: 'Total Tests Passing', | ||
value: testResults.numPassedTests, | ||
short: false | ||
}, | ||
{ | ||
title: 'Total Tests Failing', | ||
value: testResults.numFailedTests, | ||
short: false | ||
} | ||
], | ||
'footer': 'jest-slack-integration by Jameel Mukadam' | ||
} | ||
] | ||
} | ||
const options = { | ||
uri: packageJson.jestSlackIntegration.webhookUrl, | ||
method: 'POST', | ||
json: { text }, | ||
json: slackMessage, | ||
mrkdwn: true | ||
@@ -25,0 +71,0 @@ } |
@@ -21,6 +21,43 @@ 'use strict'; | ||
var slackMessage = { | ||
text: text, | ||
attachments: [{ | ||
fallback: 'Required plain-text summary of the attachment.', | ||
color: '#36a64f', | ||
title: 'Your Test Results Are In!', | ||
mrkdwn_in: ['text'], | ||
text: 'Here is a quick summary of the jest test results.. \nrun `jest` locally to see all the details \n..', | ||
fields: [{ | ||
title: 'Total Tests Suites', | ||
value: testResults.numTotalTestSuites, | ||
short: false | ||
}, { | ||
title: 'Total Tests', | ||
value: testResults.numTotalTests, | ||
short: false | ||
}, { | ||
title: 'Test Suites Passing', | ||
value: testResults.numPassedTestSuites, | ||
short: false | ||
}, { | ||
title: 'Test Suites Failing', | ||
value: testResults.numFailedTestSuites, | ||
short: false | ||
}, { | ||
title: 'Total Tests Passing', | ||
value: testResults.numPassedTests, | ||
short: false | ||
}, { | ||
title: 'Total Tests Failing', | ||
value: testResults.numFailedTests, | ||
short: false | ||
}], | ||
'footer': 'jest-slack-integration by Jameel Mukadam' | ||
}] | ||
}; | ||
var options = { | ||
uri: packageJson.jestSlackIntegration.webhookUrl, | ||
method: 'POST', | ||
json: { text: text }, | ||
json: slackMessage, | ||
mrkdwn: true | ||
@@ -27,0 +64,0 @@ }; |
{ | ||
"name": "jest-slack-integration", | ||
"version": "1.0.13", | ||
"version": "1.0.14", | ||
"description": "This script allows you to post test results to slack", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
72224
141