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

Function runLoadFiles

packages/ui/client/composables/explorer/collector.ts:30–48  ·  view source on GitHub ↗
(
  remoteFiles: File[],
  collect: boolean,
  search: SearchMatcher,
  filter: Filter,
)

Source from the content-addressed store, hash-verified

28export { hasFailedSnapshot }
29
30export function runLoadFiles(
31 remoteFiles: File[],
32 collect: boolean,
33 search: SearchMatcher,
34 filter: Filter,
35) {
36 remoteFiles.map(f => [`${f.filepath}:${f.projectName || ''}`, f] as const)
37 .sort(([a], [b]) => a.localeCompare(b))
38 .map(([, f]) => createOrUpdateFileNode(f, collect))
39
40 uiFiles.value = [...explorerTree.root.tasks]
41 runFilter(search, {
42 failed: filter.failed,
43 success: filter.success,
44 skipped: filter.skipped,
45 slow: filter.slow,
46 onlyTests: filter.onlyTests,
47 })
48}
49
50export function preparePendingTasks(packs: TaskResultPack[]) {
51 queueMicrotask(() => {

Callers 1

loadFilesMethod · 0.90

Calls 3

createOrUpdateFileNodeFunction · 0.90
runFilterFunction · 0.90
sortMethod · 0.45

Tested by

no test coverage detected