Convert old tests to use "react-testing-library"
This commit is contained in:
15
app/soapbox/components/__tests__/display_name.test.js
Normal file
15
app/soapbox/components/__tests__/display_name.test.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import React from 'react';
|
||||
|
||||
import { normalizeAccount } from 'soapbox/normalizers';
|
||||
|
||||
import { render, screen } from '../../jest/test-helpers';
|
||||
import DisplayName from '../display_name';
|
||||
|
||||
describe('<DisplayName />', () => {
|
||||
it('renders display name + account name', () => {
|
||||
const account = normalizeAccount({ acct: 'bar@baz' });
|
||||
render(<DisplayName account={account} />);
|
||||
|
||||
expect(screen.getByTestId('display-name')).toHaveTextContent('bar@baz');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user