jejacks0n / teaspoon

Teaspoon: Javascript test runner for Rails. Use Selenium, BrowserStack, or PhantomJS.
1.43k stars 243 forks source link

Tests not running and getting "ReferenceError: Can't find variable: Teaspoon" on CI server #505

Closed ucguy closed 3 years ago

ucguy commented 7 years ago

We are getting a `Reference:error: Can't find variable: Teaspoon" on our CI server (Jenkins) when we are trying to run our Jasmine js tests.

Here is the error:

** Execute teaspoon
Starting the Teaspoon server...
Puma 2.15.3 starting...
* Min threads: 0, max threads: 16
* Environment: test
* Listening on tcp://127.0.0.1:42360
Teaspoon running default suite at http://127.0.0.1:42360/teaspoon/default
ReferenceError: Can't find variable: Teaspoon
  # /teaspoon/default?reporter=Console:13 -- global code

ReferenceError: Can't find variable: Teaspoon
  # /teaspoon/default?reporter=Console:85 -- global code

Failed to load: http://127.0.0.1:42360/teaspoon/default?reporter=Console
rake teaspoon failed

We noticed that we are getting the same error when running this locally. Running rake teaspoon RAILS_ENV=test works just fine. However, we get the same Can't find variable: Teaspoon error above when we simple run rake teaspoon.

My initial question is why must we explicitly pass the test environment in order for teaspoon to work? Was there something not setup correctly in our .yml or _env files?

versions:

$ teaspoon --version
1.1.5
$ ruby --version
ruby 2.1.6p336 (2015-04-13 revision 50298) [x86_64-darwin14.0]
$ rails --version
Rails 4.2.7.1
$ sw_vers       
ProductName:    Mac OS X
ProductVersion: 10.11.6
BuildVersion:   15G1108

local:
$ phantomJS --version
2.0.0
jenkins CI server:
$ phantomJS --version
2.0.1

Any suggestions would be appreciated.

mathieujobin commented 3 years ago

too old, please open a new issue if you still need help sorry