mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-17 01:59:08 +00:00
fix tests, divorce enzyme where-ever possible
This commit is contained in:
parent
3c3af304f7
commit
2fb721078e
9 changed files with 106 additions and 907 deletions
|
@ -1,9 +1,10 @@
|
|||
import { shallow } from 'enzyme';
|
||||
import { render } from '@testing-library/react';
|
||||
import * as React from 'react';
|
||||
import { ReactifyNewlines } from './ReactifyNewlines';
|
||||
|
||||
it('renders a correct number of divs per newlines', () => {
|
||||
const view = shallow(<ReactifyNewlines>{`1\n2\n3`}</ReactifyNewlines>);
|
||||
it('renders a correct number of divs per newlines', async () => {
|
||||
const view = render(<ReactifyNewlines>{`test\ntest\ntest`}</ReactifyNewlines>);
|
||||
|
||||
expect(view.find('div').length).toBe(3);
|
||||
const elements = await view.findAllByText('test');
|
||||
expect(elements.length).toBe(3);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue