vendredi 28 février 2020

Bug in Jest js tests: react-modal: No elements were found for selector #root

I am trying to create SelectColumn.test.js similar to Summary.test.js

https://gitlab.com/sosy-lab/software/benchexec/-/blob/SelectColumn.test/benchexec/tablegenerator/react-table/src/tests/SelectColumn.test.js

But unfortunately not successful, I tried all solutions from code forums. But seems I am doing something wrong.

Result: failed

Expected result should be: passed

Error:

react-modal: No elements were found for selector #root.

      180 | 
      181 |   render() {
    > 182 |     ReactModal.setAppElement("#root");
          |                ^
      183 |     return (
      184 |       <ReactModal
      185 |         className="overlay"

Aucun commentaire:

Enregistrer un commentaire