jejacks0n / teaspoon

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

runner.rb:35:in `[]': no implicit conversion of String into Integer (TypeError) #524

Closed thebravoman closed 7 months ago

thebravoman commented 7 years ago

Example is just

console.log(1);

in any of the spec and it will throw this error on run without giving any more information.

.rvm/gems/ruby-2.2.2/gems/teaspoon-1.1.5/lib/teaspoon/runner.rb:35:in `[]': no implicit conversion of String into Integer (TypeError)

It was really difficult to track this down, because there was a console.log() in some of the js files and at a certain point there was a call to console.log with an integer and it was breaking without even saying a line or something.

soccerKevin commented 6 years ago

I have the same problem. it happens with console.log("1") too. if you change it from an int to a definitive string, like console.log("a1"), then it works

jejacks0n commented 6 years ago

interesting, hmm, wow. I think I kinda understand. I'll look into it.

thbar commented 6 years ago

@thebravoman thanks for the report. Indeed it was complicated to track down and I was starting to wonder if it was an incompatibility with the most recent phantomjs, for instance.

mathieujobin commented 7 months ago

too old and not enough info. please reopen if you can reproduce or fix.