“Jest worker 遇到 4 个子进程异常,超出重试限制”

"Jest worker encountered 4 child process exceptions, exceeding retry limit"

提问人:Riku 提问时间:11/17/2023 最后编辑:jonrsharpeRiku 更新时间:11/17/2023 访问量:27

问:

我正在添加测试脚本。然后我在运行测试时遇到了这个错误。WebView

  ● 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:181:21)

这是我的测试

test('should render correctly', () => {
  const navigation = {} as unknown as RootStackProps<'WEBVIEW'>['navigation'];
  const route = {
    params: {
      url: '**some url**',
    },
  } as unknown as RootStackProps<'WEBVIEW'>['route'];

  renderWithProviders(<WebView navigation={navigation} route={route} />);
});

我应该对测试脚本进行哪些更改?

react-native jestjs

评论


答: 暂无答案