Skip to content
Snippets Groups Projects
Unverified Commit 6d50f6da authored by Michael Kriese's avatar Michael Kriese Committed by GitHub
Browse files

chore: do not warn on skipped tests (#5879)

parent 8172de1a
No related branches found
No related tags found
No related merge requests found
...@@ -28,7 +28,7 @@ function getPath(suite: TestResult): string { ...@@ -28,7 +28,7 @@ function getPath(suite: TestResult): string {
return relative(ROOT, suite.testFilePath).replace(/\\/g, '/'); return relative(ROOT, suite.testFilePath).replace(/\\/g, '/');
} }
const ignoreStates = new Set(['passed']); const ignoreStates = new Set(['passed', 'pending']);
const MAX_ANNOTATIONS = 50; const MAX_ANNOTATIONS = 50;
const lineRe = /\.spec\.ts:(?<line>\d+):(?<col>\d+)\)/; const lineRe = /\.spec\.ts:(?<line>\d+):(?<col>\d+)\)/;
...@@ -40,7 +40,7 @@ function getPos( ...@@ -40,7 +40,7 @@ function getPos(
> { > {
const pos = lineRe.exec(msg); const pos = lineRe.exec(msg);
if (!pos || !pos.groups) { if (!pos || !pos.groups) {
return { start_line: 1, end_line: 1 }; return { start_line: 0, end_line: 0 };
} }
const line = parseInt(pos.groups.line, 10); const line = parseInt(pos.groups.line, 10);
...@@ -79,7 +79,7 @@ class GitHubReporter extends BaseReporter { ...@@ -79,7 +79,7 @@ class GitHubReporter extends BaseReporter {
const annotations: Octokit.ChecksCreateParamsOutputAnnotations[] = []; const annotations: Octokit.ChecksCreateParamsOutputAnnotations[] = [];
const success = testResult.numFailedTests === 0; const success = testResult.numFailedTests === 0;
for (const suite of testResult.testResults) { for (const suite of testResult.testResults.filter(s => !s.skipped)) {
const path = getPath(suite); const path = getPath(suite);
for (const test of suite.testResults.filter( for (const test of suite.testResults.filter(
t => !ignoreStates.has(t.status) t => !ignoreStates.has(t.status)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment