【发布时间】:2015-06-03 08:00:08
【问题描述】:
我想用 jest 对一个 react 应用程序进行单元测试。 我遵循了本指南Test React Components Using Jest (on Windows),但遇到了以下问题:
我在 Windows 7 64 位上使用 Visual Studio 2013 运行 Python 2.7.10
【问题讨论】:
我想用 jest 对一个 react 应用程序进行单元测试。 我遵循了本指南Test React Components Using Jest (on Windows),但遇到了以下问题:
我在 Windows 7 64 位上使用 Visual Studio 2013 运行 Python 2.7.10
【问题讨论】:
Jest 目前只支持 Node 版本 0.10.x
https://github.com/facebook/jest/issues/243
尝试使用 nvm 切换到兼容版本的 Node。
https://www.npmjs.com/package/nvm
大约一周前我遇到了完全相同的问题,切换到 0.10.33 解决了它。
【讨论】: