0

我很难运行 JS 测试套件 CLI。尽管测试在 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

这是回购

那么为什么它App在浏览器中看到变量而在 CLI 中却找不到呢?

$ phantomjs -v
1.9.8
4

1 回答 1

1

问题是关于 PhantomJS 版本的。现在使用 2.0.0,CLI 中的测试就足够了。

于 2015-04-29T10:02:11.283 回答