LCOV - code coverage report
Current view: top level - src/core/graph - transferLinkPresentation.ts Coverage Total Hit
Test: ComfyUI E2E Coverage Lines: 100.0 % 6 6
Test Date: 2026-11-17 04:17:53

            Line data    Source code
       1              : import { useLinkPresentationStore } from '@/stores/linkPresentationStore'
       2              : import type { GraphScope } from '@comfyorg/graph-model/graphScopeId'
       3              : import type { LinkId } from '@comfyorg/graph-model/linkId'
       4              : import type { LinkPresentation } from '@comfyorg/graph-model/linkPresentation'
       5              : 
       6          185 : export function getAgreedLinkPresentation(
       7              :   presentations: readonly (Readonly<LinkPresentation> | undefined)[]
       8              : ): Readonly<LinkPresentation> | undefined {
       9          185 :   const [first] = presentations
      10          185 :   return presentations.every(
      11              :     (candidate) =>
      12              :       candidate?.hidden === first?.hidden && candidate?.label === first?.label
      13              :   )
      14              :     ? first
      15              :     : undefined
      16              : }
      17              : 
      18          270 : export function transferLinkPresentation(
      19              :   scope: GraphScope,
      20              :   source: Readonly<LinkPresentation> | undefined,
      21              :   targetId: LinkId | undefined
      22              : ): void {
      23          270 :   if (targetId === undefined || !source) return
      24           77 :   useLinkPresentationStore().patch(scope, targetId, source)
      25              : }
        

Generated by: LCOV version 2.0-1