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

Removed the polling mechanism in favor of PhantomJS 1.6+'s WebPage#onCallback #359

Closed
wants to merge 1 commit into from
Closed

Removed the polling mechanism in favor of PhantomJS 1.6+'s WebPage#onCallback #359

wants to merge 1 commit into from

Conversation

JamesMGreene
Copy link
Member

  • Removed the polling mechanism in favor of the PhantomJS 1.6+ callback mechanism (WebPage#onCallback).
  • Added argument length checking.
  • Added QUnit object detection to avoid an infinite wait if accidentally pointed at a page without QUnit.
  • Standardized the coding style.
  • Added/updated comments and README.
  • Made some minor performance tweaks.

@Krinkle
Copy link
Member

Krinkle commented Dec 3, 2012

Note that the phantomjs addon in this repository is fairly old. Though improvements are most certainly welcome, it was no doubt in bad shape.

A lot of effort has gone into https://github.com/gruntjs/grunt-contrib-qunit, perhaps you can look there for some ideas and incorporate that in here instead. A central solution to the qunit <-> phantomjs communication (So that grunt-contrib-qunit can just use this addon and merely aggregate that instead of reinventing it all).

At this point however QUnit's own test suite is ran from jQuery's Jenkins server with the grunt solution. We don't even use this phantomjs file ourselves.

@JamesMGreene
Copy link
Member Author

If that's the case, then I'd suggest that either my pull request is accepted or else the addon is deleted. Rough code and wasted effort both make me sad. 😢

@Krinkle
Copy link
Member

Krinkle commented Dec 3, 2012

Don't worry. The refactor you did here is imho definitely the way to go. Certainly better than both the old addon as well as the grunt plugin.

We can update it later if it needs more to be able to replace the code in grunt, but that's for later. As soon as I've verified this works I'll merge it as-is (or @jzaefferer ).

Thanks!

@JamesMGreene
Copy link
Member Author

OK, sounds good. I'm happy to help with Grunt's plugin, too. I'm busy trying to keep up with the 24 Pull Requests season so I'm sure I can squeeze that in some night. ;)

@jzaefferer
Copy link
Member

Thanks! Landed in 1aad036 and updated in 0552f0d to also include stacktraces.

@jzaefferer jzaefferer closed this Dec 18, 2012
@jzaefferer
Copy link
Member

I've also opened this: gruntjs/grunt-lib-phantomjs#6

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

Successfully merging this pull request may close these issues.

3 participants