@eureca/eureca-ui
Version:
UI component library of Eureca's user and admin apps
24 lines (18 loc) • 640 B
JavaScript
import React from 'react';
import { render } from '@testing-library/react';
import { Logo } from '..';
function renderLogo(props) {
return render(<Logo {...props} data-testid="logo-testid" />);
}
describe('Logo component', () => {
it('renders the default variant', () => {
const { getByTestId } = renderLogo({});
const logo = getByTestId('logo-testid');
expect(logo.textContent).toBe('logo.svg');
});
it('renders the reduced variant', () => {
const { getByTestId } = renderLogo({ variant: 'reduced' });
const logo = getByTestId('logo-testid');
expect(logo.textContent).toBe('logo-small.svg');
});
});