import { describe, expect, it } from 'vitest';
import { extractCollectorNumberCandidate } from '../../lib/ocr-worker.js';

describe('extractCollectorNumberCandidate', () => {
  it('extracts slash-style collector numbers', () => {
    expect(extractCollectorNumberCandidate('015 / 208\nRare')).toBe('015/208');
  });

  it('extracts compact numbers from the last numeric line', () => {
    expect(extractCollectorNumberCandidate('Some set symbol\n123/456')).toBe('123/456');
  });

  it('returns empty for non-numeric noise', () => {
    expect(extractCollectorNumberCandidate('Creature — Human')).toBe('');
  });
});
