How can I configure the jsdom instance used by jest?

前端 未结 4 1156
清歌不尽
清歌不尽 2021-02-13 23:07

I\'ve come up against this issue Invalid URL is thrown when requiring systemjs in jest test cases

One of the last comments suggests

\"manipulate the jsdom instan

4条回答
  •  情深已故
    2021-02-13 23:30

    jsdom is the default environment that the latest version of Jest uses, so you can simply manipulate the global variables such as window, document or location.

提交回复
热议问题