Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

746 B
Raw Blame
import { describe, expect, it } from 'vitest';
import { repositoryLabel } from './session-code-details';

describe('repositoryLabel', () => {
  it.each([
    ['https://github.com/macro-inc/macro', 'macro-inc/macro'],
    ['https://github.com/macro-inc/macro.git/', 'macro-inc/macro'],
    ['[email protected]:macro-inc/macro.git', 'macro-inc/macro'],
    ['ssh://[email protected]/macro-inc/macro.git', 'macro-inc/macro'],
    [
      'https://[email protected]/macro-inc/macro.git?key=private',
      'macro-inc/macro',
    ],
    ['', undefined],
    ['not a repository URL', undefined],
    [null, undefined],
  ])('formats %s without credentials or transport details', (url, expected) => {
    expect(repositoryLabel(url)).toBe(expected);
  });
});