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

Function errorTree

test/test-utils/index.ts:246–256  ·  view source on GitHub ↗
(options?: { project?: boolean; stackTrace?: boolean; diff?: boolean })

Source from the content-addressed store, hash-verified

244 return ctx?.state.getTestModules() || []
245 },
246 errorTree(options?: { project?: boolean; stackTrace?: boolean; diff?: boolean }) {
247 const modules = ctx?.state.getTestModules() || []
248 const tree = options?.project
249 ? buildErrorProjectTree(modules, options)
250 : buildErrorTree(modules, options)
251 const errors = ctx?.state.getUnhandledErrors()
252 if (errors && errors.length > 0) {
253 tree.__unhandled_errors__ = errors.map((e: any) => e.message)
254 }
255 return tree
256 },
257 testTree() {
258 return buildTestTree(ctx?.state.getTestModules() || [])
259 },

Calls 4

buildErrorProjectTreeFunction · 0.85
buildErrorTreeFunction · 0.85
getTestModulesMethod · 0.80
getUnhandledErrorsMethod · 0.80

Tested by

no test coverage detected