我正在使用 karma(karma-browserstack-launcher,browserify + reactify)对 browserstack 进行测试,使用 jasmine 作为我的 reactjs 代码的测试套件,但我的行为不一致。
如果我从笔记本电脑上运行 karma start karma.conf (Chrome 39 on windows 8.1
使用Error: Invariant Violation: findComponentRoot
. (这个错误的堆栈跟踪没有让我知道在哪里解决这个问题)
如果我使用Firefox 35 on MAX OS X 10.10
and ,我会得到基本相同的结果Firefox 35 on Windows 8.1
,除了Error: Invariant Violation: findComponentRoot
来自 react 的 -error 。
如果我在Firefox 35 on Windows 8.1
本地运行测试,整个测试会ReferenceError: require is not defined
因所有测试文件中的错误而爆炸。
这里有什么问题?有没有报告这样的不一致?
我什至不确定在哪里报告这个错误,因为场上有几个球员(karma、browserstack、travis、jasmine、react)。