我很难运行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
以下是repo
那么为什么它在浏览器中看到App
变量并且无法在CLI中找到它?
$ phantomjs -v
1.9.8
答案 0 :(得分:1)
问题在于PhantomJS版本。现在使用2.0.0并在CLI中进行测试。