Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

321 B
Raw Blame
import { expect, it, vi } from 'vitest';

const submit = (draft: string, save: (value: string) => void) => {
  if (draft.trim()) save(draft.trim());
};

it('sends normalized content to the persistence boundary', () => {
  const save = vi.fn();
  submit(' hello ', save);
  expect(save).toHaveBeenCalledWith('hello');
});