jasmine / jasmine-gem

Jasmine ruby gem
682 stars 274 forks source link

It's hard to debug parse errors #174

Closed zilkey closed 10 years ago

zilkey commented 10 years ago

I'm running the jasmine gem from master (c4b0c96). Today I fat-fingered the delete key and removed a comma from a js spec. I ran jasmine in the browser, and it was all green. Then I ran jasmine:ci and I saw this:

Waiting for jasmine server on 63578...
jasmine server started.
/Users/jeff/.rvm/gems/ruby-2.0.0-p247@global/bin/rake: No such file or directory - phantomjs
/Users/jeff/.rvm/gems/ruby-2.0.0-p247@global/bin/rake: No such file or directory - phantomjs
rake aborted!
757: unexpected token at 'SyntaxError: Parse error
'

I re-ran specs in the browser, and it was green. Then I looked at the Chrome web developer console output, and saw that there was a syntax error in the javascript file.

It would be awesome if one (or both) of these things could happen:

What do you think?

kjs3 commented 10 years ago

++

hyu commented 10 years ago

+1

dlikhten commented 10 years ago

:+1: Jasmine has been silently ignoring spec file compilation issues for a long while. Would be great to do something about it.

ragaskar commented 10 years ago

This is something we'd love to see a solution for as well, there's been past attempts at adding linting/syntax-checking (see https://github.com/pivotal/jasmine/pull/179 for a pull and more discussion) but the solutions were not general enough to live in jasmine-core only so we've decided not to add them.

There is a story in our backlog to deal with this (https://www.pivotaltracker.com/story/show/24901981) but I think we'd be happy to look at pull requests and/or have someone create a gem that could add this functionality into the gem.

Closing, as we have a story for this, but feel free to continue discussion.