Jest worker encountered 4 child process exceptions, exceeding retry limit at ChildProcessWorker.initialize

Viewed 59

I am new to jest testing, and I keep getting this error when running a specific test. I am unsure figure out what is wrong. Can somebody help me?

Here is the error:

Test suite failed to run

Jest worker encountered 4 child process exceptions, exceeding retry limit

at ChildProcessWorker.initialize (node_modules/jest- 

worker/build/workers/ChildProcessWorker.js:170:21)

Here is the failing test:

    const middlewares = [thunk]

    beforeEach(() => {
    jest.resetAllMocks();
    });

    afterEach(() => {
    cleanup();
    });

   describe("Testing Pages", () => {
   const initialState = { output: 10 };
   const mockStore = configureMockStore(middlewares)
   let store;

 it("testing a AwardInner", () => {
    store = mockStore(initialState);
     render(
         <Provider store={store}>
             <AwardInner />
         </Provider>
     );
     screen.debug();
 });




it("checking Header tags", () => {
    store = mockStore(initialState);
    const { container } = render(
        <Provider store={store}>
            <AwardInner />
        </Provider>
    );
    const matches = container.querySelectorAll('h1');
    expect(matches).toHaveLength(2);
    matches.forEach((m) => {
        expect(m).toBeInTheDocument();
    });
});
});

Can anyone know where the error might be coming from?

0 Answers
Related