# extendify/3.0.4/src/Shared/lib/__tests__/dom.test.js

Extendify, version 3.0.4. 19 lines.

- Page: https://pluginprobe.com/plugins/extendify/3.0.4/code/src/Shared/lib/__tests__/dom.test.js
- Raw: https://pluginprobe.com/plugins/extendify/3.0.4/raw/src/Shared/lib/__tests__/dom.test.js
- Modified: 2026-02-18T22:27:14+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/extendify/3.0.4/code/src/Shared/lib/__tests__/dom.test.js#L10-L20`.

```javascript
import { render } from '@shared/lib/dom';
import * as element from '@wordpress/element';

jest.mock('@wordpress/element', () => ({
	render: jest.fn(),
	createRoot: undefined,
}));

describe('render (fallback)', () => {
	it('falls back to renderDeprecated if createRoot is not available', () => {
		const dummyComponent = 'div';
		const dummyNode = document.createElement('div');

		render(dummyComponent, dummyNode);

		expect(element.render).toHaveBeenCalledWith(dummyComponent, dummyNode);
	});
});

```
