import { describe, it, expect } from 'vitest';
import { isCNPJ } from './index';

describe('isCNPJ', () => {
  it.each([
    '04.252.011/0001-10',
    '40.688.134/0001-61',
    '71.506.168/0001-11',
    '40.908.605/0001-08',
    '19131243000197',
  ])('should return true for valid CNPJ: "%s"', (cnpj) => {
    expect(isCNPJ(cnpj)).toBe(true);
  });

  it.each([
    '11.111.111/1111-11',
    '22.222.222/2222-22',
    '12345678901234',
    '04.252.011/0001-00',
    ' ',
    '',
    null,
    undefined,
    '123',
  ])('should return false for invalid CNPJ: "%s"', (cnpj) => {
    expect(isCNPJ(cnpj)).toBe(false);
  });
});
