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

import { getCandidateLabel } from '../candidateLabel';

describe('candidate label', () => {
  it('puts the field name on the Chinese line', () => {
    expect(getCandidateLabel('QA审批\nQA Review', '审批人')).toBe('QA审批审批人\nQA Review');
    expect(getCandidateLabel(String.raw`QA审批\nQA Review`, '审批人')).toBe('QA审批审批人\nQA Review');
  });

  it('preserves single-line labels', () => {
    expect(getCandidateLabel('部门领导审核', '审批人')).toBe('部门领导审核审批人');
  });
});
