import * as React from 'react';
import { render } from '@testing-library/react';
import { DefaultTheme } from 'styled-components';
import { themes } from 'styles/theme/themes';
import { Lead } from '../Lead';
const renderWithTheme = (theme: DefaultTheme) => render();
describe('', () => {
it('should render and match the snapshot', () => {
const lead = renderWithTheme(themes.light);
expect(lead.container.firstChild).toMatchSnapshot();
});
it('should use theme from props', () => {
let lead = renderWithTheme(themes.light);
expect(lead.container.firstChild).toHaveStyle(
`color: ${themes.light.textSecondary}`,
);
lead = renderWithTheme(themes.dark);
expect(lead.container.firstChild).toHaveStyle(
`color: ${themes.dark.textSecondary}`,
);
});
});