import { describe, expect, it } from 'vitest';

import { formatApprovalAccount } from './approval-format';

describe('formatApprovalAccount', () => {
  it('formats the applicant consistently with approval detail', () => {
    expect(formatApprovalAccount('陈子默', 'czm', '7')).toBe('陈子默（czm）');
  });

  it('falls back when applicant account information is unavailable', () => {
    expect(formatApprovalAccount(null, null, '7')).toBe('7');
    expect(formatApprovalAccount()).toBe('-');
  });
});
