jest failing with “Target container is not a DOM element.” cause it tests my index.tsx

So i want to set up testing on a react project i working on. i set up some test files, but jest always fails with Test suite failed to run Target container is not a DOM element. 4 | import App from ‘~/App’; 5 | > 6 | ReactDOM.render(<App />, document.getElementById(‘root’)); | ^ 7 | […]