drewdeponte / snapdragon

A Jasmine JavaScript test runner that lets you run tests on the command-line similar to RSpec.
Other
6 stars 8 forks source link

Syntax errors blow up without line information #29

Closed trashhalo closed 11 years ago

trashhalo commented 11 years ago

Would be nice if it outputted file and line information for the syntax error.

/usr/local/rvm/gems/ruby-2.0.0-p247@budget_builder/gems/poltergeist-1.3.0/lib/capybara/poltergeist/browser.rb:229:in `command': One or more errors were raised in the Javascript code on the page. If you don't care about these errors, you can ignore them by setting js_errors: false in your Poltergeist configuration (see documentation for details). (Capybara::Poltergeist::JavascriptError)

SyntaxError: Parse error
    from /usr/local/rvm/gems/ruby-2.0.0-p247@budget_builder/gems/poltergeist-1.3.0/lib/capybara/poltergeist/browser.rb:29:in `visit'
    from /usr/local/rvm/gems/ruby-2.0.0-p247@budget_builder/gems/poltergeist-1.3.0/lib/capybara/poltergeist/driver.rb:89:in `visit'
    from /usr/local/rvm/gems/ruby-2.0.0-p247@budget_builder/gems/capybara-2.1.0/lib/capybara/session.rb:193:in `visit'
    from /usr/local/rvm/gems/ruby-2.0.0-p247@budget_builder/gems/snapdragon-1.0.0/lib/snapdragon/cli_application.rb:25:in `run'
drewdeponte commented 11 years ago

Hmm, looks like poltergeist/browser.rb:29 is throwing the SyntaxError: Parse Error exception.

We may have to dig into poltergeist a bit to see if it would be possible to patch poltergeist to provide that functionality. Either way I think it is really more of a feature for poltergeist than snapdragon. @trashhalo therefore, I am going to close this ticket and you should probably open a similar ticket at https://github.com/jonleighton/poltergeist unless they already have one. In which case you should comment on it and thumbs it up to represent a vote up.