Error: Invariant Violation: dangerouslyRenderMarkup(…): Cannot render markup in a worker thread

后端 未结 2 1576
梦谈多话
梦谈多话 2021-01-18 16:51

React Tests Fails after set State causes second render

Up until now testing has been going well with JSDOM and Mocha. So far have not had to test any components t

2条回答
  •  有刺的猬
    2021-01-18 17:26

    Insert your global object modifying(passing window and document objects to global) before React is required. Because React creates its ExecutionEnvironment object while required and don't modify it while works.

提交回复
热议问题