Error: jest not implemented [How to Solve]

Problem description is used in the code to open a new window, and an error is reported in jest unit test, name, config)

jest not implemented


Directly define the window. Open method in the test file, which should be suitable for all window methods. = jest.fn()

Note that the mockclear() method is always called in the test file, because window.Open is a global object and will always exist during the test.

it('test', () => {

Similar Posts: