import {
  getMonetaryUnitByCode,
  getMonetaryUnitBySymbol,
  isMonetaryUnitSupported,
} from './monetary-unit-symbol-registry';

describe('monetary-unit symbol registry', () => {
  it('tracks BTC as a non-ISO GRU monetary unit family', () => {
    expect(isMonetaryUnitSupported('BTC')).toBe(true);
    expect(getMonetaryUnitByCode('BTC')).toMatchObject({
      code: 'BTC',
      canonicalSymbol: 'cBTC',
      wrappedSymbol: 'cWBTC',
      mappingKey: 'Compliant_BTC_cW',
      decimals: 8,
    });
    expect(getMonetaryUnitBySymbol('cWBTC')).toMatchObject({
      code: 'BTC',
      canonicalSymbol: 'cBTC',
      wrappedSymbol: 'cWBTC',
    });
  });
});
