Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
renovate
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
Renovate Bot
renovate
Commits
6d50f6da
Unverified
Commit
6d50f6da
authored
4 years ago
by
Michael Kriese
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
chore: do not warn on skipped tests (#5879)
parent
8172de1a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/jest-gh-reporter.ts
+3
-3
3 additions, 3 deletions
tools/jest-gh-reporter.ts
with
3 additions
and
3 deletions
tools/jest-gh-reporter.ts
+
3
−
3
View file @
6d50f6da
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment