Skip to content

Commit 09a6105

Browse files
authored
Merge pull request #54 from hypothesis/add-container-to-body
Add container element to `document.body`
2 parents ce30201 + ff6df8a commit 09a6105

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)