| 1 |
import removeParagraph from './remove-paragraph'; |
| 2 |
|
| 3 |
describe('removeParagraph', () => { |
| 4 |
it.each([ |
| 5 |
[{}, {}], |
| 6 |
['basic text', 'basic text'], |
| 7 |
[ |
| 8 |
{ type: 'p', props: { children: 'inside paragraph' } }, |
| 9 |
'inside paragraph', |
| 10 |
], |
| 11 |
[ |
| 12 |
{ type: 'em', props: { children: 'inside em tag' } }, |
| 13 |
{ type: 'em', props: { children: 'inside em tag' } }, |
| 14 |
], |
| 15 |
[ |
| 16 |
{ type: 'p', props: { children: 'inside paragraph' } }, |
| 17 |
'inside paragraph', |
| 18 |
], |
| 19 |
])('should remove the paragraph', (component, expected) => { |
| 20 |
expect(removeParagraph(component)).toEqual(expected); |
| 21 |
}); |
| 22 |
}); |
| 23 |
|