// @flow
import React from 'react';
import { renderSnapshot } from '../../../../utils/tests';

import type { CurrencyInputProps } from './currency-input.proptypes';
import { CurrencyInput } from './index';

const DEFAULT_PROPS: CurrencyInputProps = {
  currency: 'USD',
  label: 'a great label',
  onChange: jest.fn(),
};

describe('CurrencyInput', () => {
  describe('snapshot', () => {
    it('matches the previous snapshot', () => {
      const currencyInput = renderSnapshot(
        <CurrencyInput {...DEFAULT_PROPS} />,
      );
      expect(currencyInput).toMatchSnapshot();
    });
  });
});
