import { TextStyle, ViewStyle } from 'react-native';

import { enhanceTextStyle, enhanceViewStyle } from './styles';

describe('styles', () => {
  const viewStyle: ViewStyle = { margin: 10, padding: 10, backgroundColor: '#FEFDFC' };
  const viewStyleOverride: ViewStyle = {
    padding: 20,
  };
  const viewStyleEnhanced: ViewStyle = {
    margin: 10,
    padding: 20,
    backgroundColor: '#FEFDFC',
  };
  const textStyle: TextStyle = {
    padding: 10,
    color: '#F0F0F0',
  };
  const textStyleOverride: TextStyle = {
    margin: 10,
    color: '#F0F0F0',
  };
  const textStyleEnhanced: TextStyle = {
    margin: 10,
    padding: 10,
    color: '#F0F0F0',
  };

  it('enhanceTextStyle', function () {
    const styles = enhanceTextStyle([textStyle, textStyleOverride]);

    expect(styles).toStrictEqual(textStyleEnhanced);
  });

  it('enhanceViewStyle', function () {
    const styles = enhanceViewStyle([viewStyle, viewStyleOverride]);

    expect(styles).toStrictEqual(viewStyleEnhanced);
  });
});
