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

            Line data    Source code
       1              : import { z } from 'zod'
       2              : 
       3              : import type { NodeProperty } from '@comfyorg/graph-model/nodeProperty'
       4              : import { toNodeId } from '@comfyorg/graph-model/nodeId'
       5              : 
       6              : import { parseNodePropertyArray } from './parseNodePropertyArray'
       7              : 
       8         2356 : const previewExposureSchema = z.object({
       9              :   name: z.string(),
      10              :   sourceNodeId: z.string().transform(toNodeId),
      11              :   sourcePreviewName: z.string()
      12              : })
      13              : export type PreviewExposure = z.infer<typeof previewExposureSchema>
      14              : 
      15         2356 : const previewExposuresPropertySchema = z.array(previewExposureSchema)
      16              : 
      17          985 : export function parsePreviewExposures(
      18              :   property: NodeProperty | undefined
      19              : ): PreviewExposure[] {
      20          985 :   return parseNodePropertyArray<PreviewExposure>(
      21              :     property,
      22              :     previewExposuresPropertySchema,
      23              :     'properties.previewExposures'
      24              :   )
      25              : }
        

Generated by: LCOV version 2.0-1