import { describe, expect, it } from 'vitest'
import { useApi } from '../composables/useApi'

// Note: test simple pour valider la presence de getErrorMessage.

describe('useApi', () => {
  it('retourne un message par defaut', () => {
    ;(globalThis as any).useRuntimeConfig = () => ({ public: { apiBase: '' } })
    const { getErrorMessage } = useApi()
    expect(getErrorMessage(undefined, 'fallback')).toBe('fallback')
  })
})
