Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jest render target container is not a dom element

const root = document.createElement('div');

    beforeEach(() => {
        document.body.appendChild(root);

        const content = (
            <Provider store={store}>
                <App/>
            </Provider>
        );

        render(
            content,
            root
        );
    });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #jest #render #target #container #dom #element
ADD COMMENT
Topic
Name
5+7 =