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.

455 B
Raw Blame
import { describe, expect, it } from 'vitest';

import { parseShareHandle } from './shareHandle';

describe('parseShareHandle', () => {
  it('accepts handles, @handles and share links', () => {
    expect(parseShareHandle('bob')).toBe('bob');
    expect(parseShareHandle(' @bob ')).toBe('bob');
    expect(parseShareHandle('https://app.lobehub.com/a/bob-helper/chat?x=1')).toBe('bob-helper');
    expect(parseShareHandle('  ')).toBeUndefined();
  });
});