简体   繁体   English

无法运行Teaspoon CLI,但在浏览器中成功

[英]Fail run Teaspoon CLI but success in browser

I have difficulties to run JS test suite CLI. 我很难运行JS测试套件CLI。 Although tests pass in a web browser. 尽管测试通过Web浏览器。

$ rake teaspoon
Starting the Teaspoon server...
Teaspoon running default suite at http://127.0.0.1:56362/teaspoon/default
FFFFFFFFFFFFFFFFFFF

Failures:

  1)  global failure (1, 0, 1)
     Failure/Error: TypeError: instanceof called on an object with an invalid prototype property.

  2)  global failure (1, 0, 1)
     Failure/Error: ReferenceError: Can't find variable: App

  3)  global failure (1, 0, 1)
     Failure/Error: ReferenceError: Can't find variable: App

...
and so on
...

  19)  global failure (1, 0, 1)
     Failure/Error: ReferenceError: Can't find variable: App

Finished in 0.02100 seconds
19 examples, 19 failures

Failed examples:

teaspoon -s default --filter="undefined global failure"

...
and so on
...

teaspoon -s default --filter="undefined global failure"
rake teaspoon failed

Here is the repo 这是回购

So why it sees App variable in browser and can't find it in CLI? 那么,为什么它在浏览器中看到App变量却在CLI中找不到它?

$ phantomjs -v
1.9.8

The issue was about PhantomJS version. 问题是关于PhantomJS版本。 Use 2.0.0 now and tests are adequate in CLI. 现在使用2.0.0,并且CLI中的测试已经足够。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM