Skip to content

Commit ff6df8a

Browse files
committed
Add container element to document.body
Make the `mount` function actually add the container to the document body, as described in the API docs.
1 parent ce30201 commit ff6df8a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/mount.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ export function mount(jsx: VNode, { connected = false }: MountOptions = {}) {
2525
const container = document.createElement('div');
2626
container.setAttribute('data-enzyme-container', '');
2727
containers.push(container);
28+
29+
document.body.append(container);
30+
2831
wrapper = enzyme.mount(jsx, { attachTo: container });
2932
} else {
3033
wrapper = enzyme.mount(jsx);

0 commit comments

Comments
 (0)