Commit a5a4c3e
test_runner: nix dead reporter code
reporter/utils.js formatTestReport:
1. hasChildren and showErrorDetails are never both true in
existing calls.
2. Thus if hasChildren is true, showErrorDetails is false.
3. So `|| data.details?.error?.failureType === 'subtestsFailed'`
is irrelevant.
4. And `\n${error}` never occurs.
Even though all tests pass after this commit, what if future reporter
code might make calls where both hasChildren and showErrorDetails
are true? I will address this in the last commit of this PR.
Trust me for now.
PR-URL: #59700
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>1 parent 4f30c21 commit a5a4c3eCopy full SHA for a5a4c3e
2 files changed
+4-13Lines changed: 4 additions & 13 deletions
Expand file treeCollapse file tree
Open diff view settings
Collapse file
lib/internal/test_runner/reporter/spec.js
Copy file name to clipboardExpand all lines: lib/internal/test_runner/reporter/spec.js+2-7Lines changed: 2 additions & 7 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
53 | 53 | |
54 | 54 | |
55 | 55 | |
56 | | - |
| 56 | + |
57 | 57 | |
58 | 58 | |
59 | 59 | |
| ||
71 | 71 | |
72 | 72 | |
73 | 73 | |
74 | | - |
75 | | - |
76 | | - |
77 | | - |
78 | | - |
79 | 74 | |
80 | | - |
| 75 | + |
81 | 76 | |
82 | 77 | |
83 | 78 | |
|
Collapse file
lib/internal/test_runner/reporter/utils.js
Copy file name to clipboardExpand all lines: lib/internal/test_runner/reporter/utils.js+2-6Lines changed: 2 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
58 | 58 | |
59 | 59 | |
60 | 60 | |
61 | | - |
62 | 61 | |
63 | 62 | |
64 | 63 | |
| ||
68 | 67 | |
69 | 68 | |
70 | 69 | |
71 | | - |
| 70 | + |
72 | 71 | |
73 | 72 | |
74 | 73 | |
| ||
83 | 82 | |
84 | 83 | |
85 | 84 | |
86 | | - |
87 | | - |
88 | | - |
89 | | - |
| 85 | + |
90 | 86 | |
91 | 87 | |
92 | 88 | |
|
0 commit comments