mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-24 19:39:11 +00:00
10 lines
378 B
TypeScript
10 lines
378 B
TypeScript
import { render } from '@testing-library/react';
|
|
import * as React from 'react';
|
|
import { ReactifyNewlines } from './ReactifyNewlines';
|
|
|
|
it('renders a correct number of divs per newlines', async () => {
|
|
const view = render(<ReactifyNewlines>{`test\ntest\ntest`}</ReactifyNewlines>);
|
|
|
|
const elements = await view.findAllByText('test');
|
|
expect(elements.length).toBe(3);
|
|
});
|