import { describe, it, expectTypeOf } from 'vitest'
import type { Listing, Keyword, TargetSite, Stats, Config, SiteSelectors } from '../lib/types'

describe('Types', () => {
  it('Listing has parsed images as string array', () => {
    expectTypeOf<Listing['images']>().toEqualTypeOf<string[]>()
  })
  it('Listing has closing_alerts_sent as number array', () => {
    expectTypeOf<Listing['closing_alerts_sent']>().toEqualTypeOf<number[]>()
  })
  it('TargetSite enabled is 0|1 not boolean', () => {
    expectTypeOf<TargetSite['enabled']>().toEqualTypeOf<0 | 1>()
  })
  it('Stats engine_status is string union', () => {
    expectTypeOf<Stats['engine_status']>().toEqualTypeOf<'Idle' | 'Running' | 'Paused'>()
  })
})
