import { describe, it, expect, vi } from 'vitest'
import { mount } from '@vue/test-utils'
import App from './App.vue'

vi.mock('./firebase', () => ({
  auth: {},
  db: {}
}))

vi.mock('./composables/useAuth', () => {
  const { ref } = require('vue')
  return {
    useAuth: () => ({
      isAllowed: true,
      user: ref(null),
      login: vi.fn(),
      logout: vi.fn(),
      error: null
    })
  }
})

describe('Smoke Test', () => {
    it('mounts properly', () => {
        const wrapper = mount(App)
        expect(wrapper.exists()).toBe(true)
    })

    it('renders header text', () => {
        const wrapper = mount(App)
        expect(wrapper.text()).toContain('HAUMDAUCHER')
    })
})
