danger-plugin-coverage
Advanced tools
Comparing version 1.3.1 to 1.3.2
@@ -265,2 +265,7 @@ "use strict"; | ||
const relevantFiles = getRelevantFiles(coverageXml, showAllFiles); | ||
if (!relevantFiles.length) { | ||
return; | ||
} | ||
const combinedMetrics = getCombinedMetrics(relevantFiles); | ||
@@ -267,0 +272,0 @@ const table = buildTable(relevantFiles, maxRows, threshold, showAllFiles); |
{ | ||
"name": "danger-plugin-coverage", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"description": "A Danger plugin to report code coverage.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -300,2 +300,6 @@ import path from 'path'; | ||
if (!relevantFiles.length) { | ||
return; | ||
} | ||
const combinedMetrics = getCombinedMetrics(relevantFiles); | ||
@@ -302,0 +306,0 @@ const table = buildTable(relevantFiles, maxRows, threshold, showAllFiles); |
@@ -406,3 +406,3 @@ import path from 'path'; | ||
it('does not report anything if no coverage reported for the files changed', async () => { | ||
it('does not report anything if no coverage reported', async () => { | ||
mockFs(); | ||
@@ -414,2 +414,24 @@ | ||
}); | ||
it('does not report anything if no coverage reported for the files changed', async () => { | ||
const fileOne = getFileXml('src/one.js', defautMetrics, [defaultLine]); | ||
const xmlReport = wrapXmlReport([fileOne].join('\n')); | ||
mockFs({ | ||
[cloverPath]: xmlReport, | ||
}); | ||
Object.assign(danger, { | ||
git: { | ||
created_files: ['package.json'], | ||
modified_files: ['package.json', 'yarn.lock'], | ||
commits: [{ sha: 'abc123' }], | ||
}, | ||
}); | ||
await coverage(); | ||
expect(getMarkdownReport()).toBeUndefined(); | ||
}); | ||
}); |
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
47781
1158