Skip to content

Commit

Permalink
Fix #341: dont show skipped test line numbers with --verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwalter committed Jan 28, 2021
1 parent e469b26 commit 0b8cc04
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/popular-tables-yell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ianwalter/bff": patch
---

Fix #341: dont show skipped test line numbers with --verbose
4 changes: 2 additions & 2 deletions packages/bff/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,10 @@ export async function run (config) {
context.testsRun++

// Log the relative file path and test duration if in verbose mode.
if (context.verbose && !context.receivedSigint) {
if (context.verbose && !context.receivedSigint && result) {
const pad = ''.padEnd((context.testsRun * 100).toString().length)
logger.log(`${pad}${file.relativePath}:${test.lineNumber}`)
if (result && result.duration) {
if (result.duration) {
logger.log(chalk.dim(`${pad}in`, result.duration))
}
}
Expand Down

0 comments on commit 0b8cc04

Please sign in to comment.