Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test results differ from jasmine in "regular" browser run #35

Closed
ku1ik opened this issue Feb 11, 2012 · 1 comment
Closed

Test results differ from jasmine in "regular" browser run #35

ku1ik opened this issue Feb 11, 2012 · 1 comment

Comments

@ku1ik
Copy link

ku1ik commented Feb 11, 2012

When I run my specs in Chrome they work fine, 11 specs, all passing (see here: http://i.imgur.com/JPdHH.png)
When I run them through guard-jasmine (and phantomjs) the output is following:

> 
Run all Jasmine suites
Run Jasmine suite at http://localhost:3000/jasmine
AsciiIo.PlayerView
  constructor
    ✘ creates needed DOM elements inside player element
      ➤ TypeError: 'undefined' is not a function
    ✘ creates HudView instance passing proper DOM element
      ➤ TypeError: 'undefined' is not a function
    ✘ creates Movie instance
      ➤ TypeError: 'undefined' is not a function
  events
    ✘ toggles movie playback when terminal-click is fired on terminal
      ➤ TypeError: 'undefined' is not a function
      ➤ TypeError: 'null' is not an object
    ✘ toggles movie playback when hud-play-click is fired on hud
      ➤ TypeError: 'undefined' is not a function
      ➤ TypeError: 'null' is not an object
    ✘ seeks movie playback when hud-seek-click is fired on hud
      ➤ TypeError: 'undefined' is not a function
      ➤ TypeError: 'null' is not an object
    ✘ toggles fullscreen view when hud-fullscreen-click is fired on hud
      ➤ TypeError: 'undefined' is not a function
    ✘ stops cursor blinking when movie-finished is fired on movie
      ➤ TypeError: 'undefined' is not a function
      ➤ TypeError: 'null' is not an object
    ✘ feeds interpreter when movie-frame is fired on movie
      ➤ TypeError: 'undefined' is not a function
      ➤ TypeError: 'null' is not an object
  #play
    ✘ starts movie playback
      ➤ TypeError: 'undefined' is not a function
ERROR: 16 specs, 15 failures
in 0.034 seconds

First, bad thing is that some specs are failing (due to sth being undefine).
Second, number of specs differ (here is 16, jasmine in Chrome reported 11 and this is correct).
Third, it says 15 failures but displays only 10 failed cases.

How can I troubleshoot it? I have phantomjs compiled under my Fedora using instructions from here: http://code.google.com/p/phantomjs/wiki/BuildInstructions

@netzpirat
Copy link
Contributor

I also noticed the discrepancy between the number of specs in Chrome and PhantomJS, and I haven't found the cause yet. I planned to refactor the CoffeeScript runner and add specs to it and I hope to fix the issue then. To debug the runner you can use the guard-jasmine-debug helper and add console.log statements to the runner.

The big downside of guard-jasmine is currently, that PhantomJS does not provide a stack trace, so all you can do to find the cause for the TypeError is to add simple console.log statements to your specs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants