# genesis-blocks/trunk/src/utils/helpers/remove-paragraph.test.js

Genesis Blocks, version trunk. 23 lines.

- Page: https://pluginprobe.com/plugins/genesis-blocks/trunk/code/src/utils/helpers/remove-paragraph.test.js
- Raw: https://pluginprobe.com/plugins/genesis-blocks/trunk/raw/src/utils/helpers/remove-paragraph.test.js
- Modified: 2025-03-19T16:30:16+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/genesis-blocks/trunk/code/src/utils/helpers/remove-paragraph.test.js#L10-L20`.

```javascript
import removeParagraph from './remove-paragraph';

describe('removeParagraph', () => {
	it.each([
		[{}, {}],
		['basic text', 'basic text'],
		[
			{ type: 'p', props: { children: 'inside paragraph' } },
			'inside paragraph',
		],
		[
			{ type: 'em', props: { children: 'inside em tag' } },
			{ type: 'em', props: { children: 'inside em tag' } },
		],
		[
			{ type: 'p', props: { children: 'inside paragraph' } },
			'inside paragraph',
		],
	])('should remove the paragraph', (component, expected) => {
		expect(removeParagraph(component)).toEqual(expected);
	});
});

```
