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

Use window.callPhantom? #6

Open
jzaefferer opened this issue Dec 18, 2012 · 9 comments
Open

Use window.callPhantom? #6

jzaefferer opened this issue Dec 18, 2012 · 9 comments

Comments

@jzaefferer
Copy link
Member

PhantomJS 1.6+ has a callback API that might be useful to replace the alert-json-tmp-file hackity hack. QUnit's phantomjs now makes use of that, maybe that's useful as a reference: https://github.com/jquery/qunit/blob/0552f0d8ae1a43fcfa0bbee17dc958fef2d29e0d/addons/phantomjs/runner.js#L115

@JamesMGreene
Copy link

Here's the API reference on it, too, freshly updated:
https://github.com/ariya/phantomjs/wiki/API-Reference#wiki-webpage-onCallback

@cowboy
Copy link
Member

cowboy commented Dec 18, 2012

This seems like a good idea but I currently lack the bandwidth to do anything with it. If you submit a working PR, however, I'll definitely merge it in!

Also, unit tests?

@JamesMGreene
Copy link

Also, unit tests?

Do you mean you would want additional unit tests in the grunt-lib-phantomjs plugin for this, or you want to see the related PhantomJS unit tests?

@cowboy
Copy link
Member

cowboy commented Dec 18, 2012

I was just saying this project could probably use unit tests in general. But I don't know what they should look like. Maybe it's less unit and more functional. Either way, something that asserts that things are working as-intended!

@maenu
Copy link

maenu commented Jan 5, 2013

I second that.

It took me hours to figure out how to communicate between PhantomJS and grunt, by alert() or console.log(), without changing the module that uses PhantomJS. But together with grunt-istanbul and grunt-contrib-jasmine, I have now a branch coverage report for my jasmine tests - awesome.

@jsoverson
Copy link
Member

@maenu, I'd love to see how you set up coverage reporting with grunt-istanbul and contrib-jasmine

@maenu
Copy link

maenu commented Jan 7, 2013

I made an example repo under example-grunt-jasmine-istanbul.

@Arkni
Copy link
Member

Arkni commented Feb 12, 2016

From PhantomJS docs:

window.callPhantom is still an experimental API. In the near future, it will be likely replaced with a message-based solution which will still provide the same functionality

Is this issue still relevant ?

@jzaefferer
Copy link
Member Author

Sounds useful to keep this open until that new API is available.

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

6 participants