Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: #4010 Displays time in green #6432

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ export function renderTree(
` ${Math.round(task.result.duration)}${c.dim('ms')}`,
)
}
else {
suffix += c.green(
` ${Math.round(task.result.duration)}${c.dim('ms')}`,
)
}
}

if (options.showHeap && task.result?.heap != null) {
Expand Down
12 changes: 6 additions & 6 deletions packages/vitest/src/node/reporters/renderers/listRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@ import { F_RIGHT } from '../../../utils/figures'
import type { Logger } from '../../logger'
import type { VitestRunMode } from '../../types/config'
import type { Benchmark, BenchmarkResult } from '../../../runtime/types/benchmark'
import {
formatProjectName,
getCols,
getHookStateSymbol,
getStateSymbol,
} from './utils'
import { formatProjectName, getCols, getHookStateSymbol, getStateSymbol } from './utils'

export interface ListRendererOptions {
renderSucceed?: boolean
Expand Down Expand Up @@ -160,6 +155,11 @@ function renderTree(
` ${Math.round(task.result.duration)}${c.dim('ms')}`,
)
}
else {
suffix += c.green(
` ${Math.round(task.result.duration)}${c.dim('ms')}`,
)
}
}

if (options.showHeap && task.result?.heap != null) {
Expand Down
Loading