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.

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

import { buildDocumentModalUrl } from './url';

describe('buildDocumentModalUrl', () => {
  it('builds a canonical personal page URL independently of the current route', () => {
    expect(buildDocumentModalUrl('https://example.com', 'doc-1')).toBe(
      'https://example.com/resource/page/doc-1',
    );
  });

  it('includes the active workspace slug', () => {
    expect(buildDocumentModalUrl('https://example.com', 'doc-1', 'acme')).toBe(
      'https://example.com/acme/resource/page/doc-1',
    );
  });
});