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 tooling (phantomjs support?) #43

Closed
shaunc opened this issue Aug 26, 2015 · 3 comments
Closed

test tooling (phantomjs support?) #43

shaunc opened this issue Aug 26, 2015 · 3 comments

Comments

@shaunc
Copy link
Contributor

shaunc commented Aug 26, 2015

The fact that ember-collection doesn't run in phantomjs tripped me up for a time; at the least the documentation should mention that, as phantomjs is standard config for ember-cli apps.

Better would be to get it to work in phantomjs, though; we need a requestAnimationFrame polyfill. I tried https://github.com/cagosta/requestAnimationFrame but couldn't get it to work. Any ideas?

@shaunc shaunc changed the title test tooling test tooling (phantomjs support?) Aug 26, 2015
@calderas
Copy link

calderas commented Oct 7, 2015

I ran into this issue and was able to use this polyfill for phantomjs
https://gist.github.com/paulirish/1579671

@shaunc
Copy link
Contributor Author

shaunc commented Oct 8, 2015

ah great :)

@oliverwilkie
Copy link

If it helps, I installed this polyfill

bower install raf.js

and then updated my ember-cli-build.js

with

  /**
   * phantomJS needs a polyfill of requestAnimationFrame, which
   * is used in ember-collection.
   */
   app.import('bower_components/raf.js/raf.min.js', {test: true});

raytiley added a commit to raytiley/ember-collection that referenced this issue Jan 30, 2016
This is mostly to allow tests to run in PhantomJS without requring a 'requestAnimationFrame' pollyfill. Closes adopted-ember-addons#43.
raytiley added a commit to raytiley/ember-collection that referenced this issue Jan 30, 2016
This is mostly to allow tests to run in PhantomJS without requring a 'requestAnimationFrame' pollyfill. Closes adopted-ember-addons#43.
raytiley added a commit to raytiley/ember-collection that referenced this issue Jan 31, 2016
This is mostly to allow tests to run in PhantomJS without requring a 'requestAnimationFrame' pollyfill. Closes adopted-ember-addons#43.

The weirdness in the test is because there is no way currently to make sure the component is cleared and destroyed before the module's teardown hook is called. Wrapping the component in an if is a workaround until this: https://github.com/switchfly/ember-test-helpers/pull/147/files lands.
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

3 participants