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

Function hasFailedSnapshot

packages/vitest/src/utils/tasks.ts:12–20  ·  view source on GitHub ↗
(suite: Arrayable<Task>)

Source from the content-addressed store, hash-verified

10}
11
12export function hasFailedSnapshot(suite: Arrayable<Task>): boolean {
13 return getTests(suite).some((s) => {
14 return s.result?.errors?.some(
15 e =>
16 typeof e?.message === 'string'
17 && e.message.match(/Snapshot .* mismatched/),
18 )
19 })
20}
21
22export function convertTasksToEvents(file: File, onTask?: (task: Task) => void): {
23 packs: TaskResultPack[]

Callers 2

runCollectFunction · 0.90
onWatcherStartFunction · 0.90

Calls 2

getTestsFunction · 0.90
matchMethod · 0.45

Tested by

no test coverage detected