react-native - 测试库 React-Native - 我尝试调试时不会发生内存泄漏
问题描述
因此,我正在尝试为使用 react-navigation 和 relay modern 的 React-Native 组件编写测试。我收到此警告:
A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --runInBand --detectOpenHandles to find leaks.
当我评论它时,我在测试中找到了确切的行,警告消失了:
fireEvent.changeText(emailInput, expectedEmail);
问题是当我添加--runInBand --detectOpenHandles
到我的测试命令时,警告不再发生。非常感谢任何建议。
解决方案
推荐阅读
- django - 如何创建管理命令以通过电子邮件发送密码重置?
- reactjs - 材料表反应 - 编辑期间禁用保存
- airflow - “字段:prediction_input.model_name 错误:名称应采用 'projects/your-project-id/models/your-model-name' 的形式”
- javascript - 无法在表单验证中读取未定义的属性“值”
- reactjs - 在更新组合减速器中的一个减速器状态时,防止其他减速器状态重置
- sql - 根据两列中的值选择行,其中姓名和姓氏的顺序在 MS SQL Server 中不重要?
- google-chrome-devtools - 在 Chrome 开发工具中,是否可以通过 HTTP 使用内容类型 application/protobuf 解码二进制响应
- c++ - 在 C++ 中本地重新定义全局函数的实现
- docker - docker service verify:检测到任务失败
- continuous-integration - 约束曲面上的数值积分