question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failing test results in an error message from phantomjs

See original GitHub issue

If all my specs pass then I don’t get an error. If I have a failure then I get this error. Any thoughts? Only thing I could think of is perhaps on line 28 of the jasmine-rails_tasks.rake file phantomjs is upset about the missing spec_filter?

Rails 3.2.14 Ruby 2.0.0-p247 OS X 10.8.4 PhantomJS 1.9.0.

Thanks! Jon

± RAILS_ENV=test bundle exec rake spec:javascript                 ruby-2.0.0-p247@bolstr
$ phantomjs "/Users/jon/.rvm/gems/ruby-2.0.0-p247@bolstr/gems/jasmine-rails-0.4.5/lib/tasks/runner.js" "file:///Users/jon/Sites/rails/bolstr/bolstr/spec/tmp/runner.html?spec="
Running: file:///Users/jon/Sites/rails/bolstr/bolstr/spec/tmp/runner.html?spec=
Starting...
Foo : does something else
  Expected 5 to be 3.

Finished
-----------------
2 specs, 1 failure in 0.005s.

ConsoleReporter finished
rake aborted!
Error executing command: phantomjs "/Users/jon/.rvm/gems/ruby-2.0.0-p247@bolstr/gems/jasmine-rails-0.4.5/lib/tasks/runner.js" "file:///Users/jon/Sites/rails/bolstr/bolstr/spec/tmp/runner.html?spec="
/Users/jon/.rvm/gems/ruby-2.0.0-p247@bolstr/gems/jasmine-rails-0.4.5/lib/tasks/jasmine-rails_tasks.rake:5:in `run_cmd'
/Users/jon/.rvm/gems/ruby-2.0.0-p247@bolstr/gems/jasmine-rails-0.4.5/lib/tasks/jasmine-rails_tasks.rake:28:in `block (2 levels) in <top (required)>'
/Users/jon/.rvm/gems/ruby-2.0.0-p247@bolstr/bin/ruby_noexec_wrapper:14:in `eval'
/Users/jon/.rvm/gems/ruby-2.0.0-p247@bolstr/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => spec:javascript
(See full trace by running task with --trace)

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
doryphorescommented, Sep 14, 2013

Wouldn’t this prevent failing tests to break a build in a CI environment? I investigated preventing this error output before but seem to remember that the exit status code is required for CI.

0reactions
juandazapatacommented, Jul 1, 2016

Ended up by removing jasmine-rails and going with vanilla jasmine gem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PhantomJS exits after syntax error when running unit tests
I usually use this code to warn about errors and resume the run (phantomjs) phantom.onError = function(msg, trace) { var msgStack = ['PHANTOM...
Read more >
Introduction: Troubleshooting - Wallaby.js
Ensure tests are passing outside of Wallaby · Diagnostics Report · More debug information · Configuration issue · Try resetting your testing framework...
Read more >
Replacing PhantomJS and CasperJS with JSDOM and Chai ...
Better logs and errors We wanted to make the test failure messages more clear and reduce the logspam for passing tests (6 lines...
Read more >
Moving from PhantomJS to Chrome
We used PhantomJS for automated UI testing for some time. ... was that PhantomJS did not mention the assertion failure in the below...
Read more >
Visual Testing using PhantomCSS in JavaScript
echo( msg ); } ); casper.on( 'error', function ( err ) { this.die( "PhantomJS has errored: " + err ); } ); casper.on( ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found