简体   繁体   中英

Fail run Teaspoon CLI but success in browser

I have difficulties to run JS test suite CLI. Although tests pass in a web browser.

$ 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?

$ phantomjs -v
1.9.8

The issue was about PhantomJS version. Use 2.0.0 now and tests are adequate in CLI.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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