import { ShippingDocumentNumberFormatterPipe } from './shipping-document-number-formatter.pipe';

describe('ShippingDocumentNumberFormatterPipe', () => {
  let pipe: ShippingDocumentNumberFormatterPipe;

  beforeEach(() => {
    pipe = new ShippingDocumentNumberFormatterPipe();
  });

  it('should create an instance', () => {
    const pipeInstance = new ShippingDocumentNumberFormatterPipe();
    expect(pipeInstance).toBeTruthy();
  });

  it('should return 026706900194072971', () => {
    const shippingDocumentNumber = '026706900194072971';

    const result = pipe.transform(shippingDocumentNumber);

    expect(result).toBe('026706900194072971');
  });

  it('should return 026706900194072972', () => {
    const shippingDocumentNumber = '026706900194072972_DEL@2020030516515137470';

    const result = pipe.transform(shippingDocumentNumber);

    expect(result).toBe('026706900194072972');
  });
});
