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

            Line data    Source code
       1              : import { defineStore } from 'pinia'
       2              : import { computed } from 'vue'
       3              : 
       4              : import type { ActionBarButton } from '@/types/comfy'
       5              : 
       6              : import { useExtensionStore } from '@/platform/extensions/stores/extensionStore'
       7              : 
       8         2355 : export const useActionBarButtonStore = defineStore('actionBarButton', () => {
       9         1975 :   const extensionStore = useExtensionStore()
      10              : 
      11              :   const buttons = computed<ActionBarButton[]>(() =>
      12              :     extensionStore.extensions
      13              :       .filter((e) => extensionStore.contributes(e.name))
      14              :       .flatMap((e) => e.actionBarButtons ?? [])
      15              :   )
      16              : 
      17         1975 :   return {
      18              :     buttons
      19              :   }
      20              : })
        

Generated by: LCOV version 2.0-1