import { describe, it, expect, vi } from 'vitest'; import { gerarResposta } from './assistant-utils'; describe('assistant-utils/gerarResposta', () => { it('returns a generic response for unknown input', () => { const result = gerarResposta('hello'); expect(typeof result).toBe('string'); expect((result as string).length).toBeGreaterThan(0); }); it('uses custom responses if provided', () => { const customResponses = [{ trigger: 'custom', response: 'custom response' }]; const result = gerarResposta('custom', customResponses); expect(result).toBe('custom response'); }); });