pleroma/app/soapbox/components/__tests__/display-name.test.tsx

16 lines
462 B
TypeScript
Raw Normal View History

import React from 'react';
2023-06-20 12:24:39 -07:00
import { buildAccount } from 'soapbox/jest/factory';
import { render, screen } from '../../jest/test-helpers';
2022-05-13 09:12:19 -07:00
import DisplayName from '../display-name';
2020-03-27 13:59:38 -07:00
describe('<DisplayName />', () => {
it('renders display name + account name', () => {
2023-06-20 12:24:39 -07:00
const account = buildAccount({ acct: 'bar@baz' });
render(<DisplayName account={account} />);
2020-03-27 13:59:38 -07:00
expect(screen.getByTestId('display-name')).toHaveTextContent('bar@baz');
2020-03-27 13:59:38 -07:00
});
});