jest-slack-integration
Advanced tools
Comparing version 1.0.16 to 1.0.17
@@ -17,3 +17,5 @@ const readPkg = require('read-pkg') | ||
const passedMessage = `<!here> Great News! All *${testResults.numPassedTests}* tests have passed! Code coverage is coming soon..` | ||
const text = (testResults.numFailedTestSuites > 0 || testResults.numFailedTests > 0 ) ? failedMessage : passedMessage | ||
const failedTests = testResults.numFailedTestSuites > 0 || testResults.numFailedTests > 0 | ||
const text = failedTests ? failedMessage : passedMessage | ||
const borderColor = failedTests ? '#a30200' : '#36a64f' | ||
@@ -25,3 +27,3 @@ const slackMessage = { | ||
fallback: 'Required plain-text summary of the attachment.', | ||
color: '#36a64f', | ||
color: borderColor, | ||
title: 'Your Test Results Are In!', | ||
@@ -28,0 +30,0 @@ author_name: (packageJson.jestSlackIntegration.appName) ? packageJson.jestSlackIntegration.appName : 'App', |
@@ -19,3 +19,5 @@ 'use strict'; | ||
var passedMessage = '<!here> Great News! All *' + testResults.numPassedTests + '* tests have passed! Code coverage is coming soon..'; | ||
var text = testResults.numFailedTestSuites > 0 || testResults.numFailedTests > 0 ? failedMessage : passedMessage; | ||
var failedTests = testResults.numFailedTestSuites > 0 || testResults.numFailedTests > 0; | ||
var text = failedTests ? failedMessage : passedMessage; | ||
var borderColor = failedTests ? '#a30200' : '#36a64f'; | ||
@@ -26,3 +28,3 @@ var slackMessage = { | ||
fallback: 'Required plain-text summary of the attachment.', | ||
color: '#36a64f', | ||
color: borderColor, | ||
title: 'Your Test Results Are In!', | ||
@@ -29,0 +31,0 @@ author_name: packageJson.jestSlackIntegration.appName ? packageJson.jestSlackIntegration.appName : 'App', |
{ | ||
"name": "jest-slack-integration", | ||
"version": "1.0.16", | ||
"version": "1.0.17", | ||
"description": "This script allows you to post test results to slack", | ||
@@ -22,2 +22,2 @@ "main": "index.js", | ||
} | ||
} | ||
} |
@@ -17,3 +17,3 @@ # Jest Slack Integration | ||
``` | ||
Set `jest-slack-integration` as the jest testResultsProcessor | ||
Set `jest-slack-integration` as the jest testResultsProcessor in your `package.json` or `jest.config.js` file | ||
``` | ||
@@ -20,0 +20,0 @@ "jest": { |
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
72785
147