test_runner: nix dead reporter code · nodejs/node@a5a4c3e · GitHub
Skip to content

Commit a5a4c3e

Browse files
vassudanaguntaaduh95
authored andcommitted
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 a5a4c3e

2 files changed

Lines changed: 4 additions & 13 deletions

File tree

lib/internal/test_runner/reporter/spec.js

Lines changed: 2 additions & 7 deletions

lib/internal/test_runner/reporter/utils.js

Lines changed: 2 additions & 6 deletions

0 commit comments

Comments
 (0)