import { ConversionService } from './conversion.service';

describe('ConversionService', () => {
  const service = new ConversionService();

  it('10 Bits = 1 TC', () => expect(service.bitsToTC(10)).toBe(1));
  it('15 Bits = 1 TC (floor)', () => expect(service.bitsToTC(15)).toBe(1));
  it('0 Bits = 0 TC', () => expect(service.bitsToTC(0)).toBe(0));
  it('9 Bits = 0 TC', () => expect(service.bitsToTC(9)).toBe(0));
  it('100 Bits = 10 TC', () => expect(service.bitsToTC(100)).toBe(10));
  it('1000 Bits = 100 TC', () => expect(service.bitsToTC(1000)).toBe(100));
  it('throws on negative bits', () => expect(() => service.bitsToTC(-1)).toThrow());
});
