import { setThousandsSeparator } from '.';

describe('setThousandsSeparator', () => {
  it('case0', () => {
    expect(setThousandsSeparator('')).toEqual('');
    expect(setThousandsSeparator('1')).toEqual('1');
    expect(setThousandsSeparator('.12345')).toEqual('.12345');
    expect(setThousandsSeparator('1.')).toEqual('1.');
    expect(setThousandsSeparator('12.34')).toEqual('12.34');
    expect(setThousandsSeparator('123.34')).toEqual('123.34');
    expect(setThousandsSeparator('1234.34')).toEqual('1,234.34');
    expect(setThousandsSeparator('12345.345')).toEqual('12,345.345');
    expect(setThousandsSeparator('123456.345')).toEqual('123,456.345');
    expect(setThousandsSeparator('1234567.34')).toEqual('1,234,567.34');
    expect(setThousandsSeparator('-1234567.34')).toEqual('-1,234,567.34');
    expect(setThousandsSeparator('-234567.34')).toEqual('-234,567.34');
  });
});
