LCOV - code coverage report
Current view: top level - src/platform/billing/subscription/utils - subscribeToRunDialogOptions.ts Coverage Total Hit
Test: ComfyUI E2E Coverage Lines: 0.0 % 2 0
Test Date: 2026-11-17 04:17:53

            Line data    Source code
       1              : import type { SubscriptionState } from '@comfyorg/ingest-types'
       2              : 
       3              : import type { SubscriptionDialogOptions } from '@/platform/billing/composables/types'
       4              : import { pendingServerFact } from '@/platform/serverFacts/pendingServerFact'
       5              : 
       6              : /** Subscribe to Run paywall options; flags locked credits for a funded account with no plan. */
       7            0 : export function subscribeToRunDialogOptions(facts: {
       8              :   subscriptionState: SubscriptionState | null
       9              :   hasFunds: boolean | undefined
      10              : }): SubscriptionDialogOptions {
      11              :   const creditsLocked = pendingServerFact(
      12              :     'BE-24447',
      13              :     facts.hasFunds === true &&
      14              :       (facts.subscriptionState === 'never_subscribed' ||
      15              :         facts.subscriptionState === 'ended')
      16              :   )
      17            0 :   return {
      18              :     reason: 'subscribe_to_run',
      19              :     ...(creditsLocked && { creditsLocked: true })
      20              :   }
      21              : }
        

Generated by: LCOV version 2.0-1