MCPcopy
hub / github.com/vitest-dev/vitest / isSlowTestTask

Function isSlowTestTask

packages/ui/client/composables/explorer/utils.ts:36–48  ·  view source on GitHub ↗
(task: Task)

Source from the content-addressed store, hash-verified

34}
35
36export function isSlowTestTask(task: Task) {
37 if (task.type !== 'test') {
38 return false
39 }
40
41 const duration = task.result?.duration
42 if (typeof duration !== 'number') {
43 return false
44 }
45
46 const threshold = config.value.slowTestThreshold
47 return typeof threshold === 'number' && duration > threshold
48}
49
50export function getSortedRootTasks(sort: SortUIType, tasks = explorerTree.root.tasks) {
51 const sorted = [...tasks]

Callers 2

collectTestsFunction · 0.90
createOrUpdateNodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected