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 failed under PhantomJS as of 0.21.1 #312

Closed
niemyjski opened this issue Dec 15, 2014 · 9 comments
Closed

Test failed under PhantomJS as of 0.21.1 #312

niemyjski opened this issue Dec 15, 2014 · 9 comments

Comments

@niemyjski
Copy link

[15:37:56][Step 3/4] Running "karma:all_tests" (karma) task
[15:38:00][Step 3/4] PhantomJS 1.9.8 (Windows 8) ERROR
[15:38:00][Step 3/4] TypeError: 'undefined' is not a function (evaluating 'Function.call.bind(String.prototype.indexOf)')
[15:38:00][Step 3/4] at C:/TeamCity/buildAgent/work/3e6130cb0bb9bb89/src/bower_components/es6-shim/es6-shim.js:83
[15:38:00][Step 3/4]
[15:38:00][Step 3/4] Finished in 0.121 secs / 0 secs

This is happening in all of the latest build except 0.21.1. Any ideas?

@ljharb
Copy link
Collaborator

ljharb commented Dec 15, 2014

Thanks for the report! Can you test whether both Function.call and Function.prototype.call exist in PhantomJS for me?

Phantom is old and weird, and iirc, doesn't even have Function#bind prior to v2.

@niemyjski
Copy link
Author

I'm not 100% sure if it's in the latest as there is a ton of activity there: ariya/phantomjs#10522 .. I think a polyfill is needed (LOL)

@ljharb
Copy link
Collaborator

ljharb commented Dec 15, 2014

:-) If Function#call is present but Function.call is not, then I'll either use the former, or fix the es6-shim to add in Function.call. Let me know :-)

@niemyjski
Copy link
Author

I'd just add in Function.call :)

@ljharb
Copy link
Collaborator

ljharb commented Dec 16, 2014

Ah, I see the problem.

The es6-shim requires the es5-shim, especially when not in a true ES5 environment like PhantomJS. Simply require that first, and the es6-shim should work for you.

@ljharb ljharb closed this as completed Dec 16, 2014
@niemyjski
Copy link
Author

I'm targeting es5/es6 but only target evergreen browsers. I only needed es6 for startsWith... I'll see if I can bring it in only for the test runner because I'd hate to have to min that too..

@domenic
Copy link

domenic commented Dec 16, 2014

only target evergreen browsers.

... PhantomJS ...

O_____O

@ljharb
Copy link
Collaborator

ljharb commented Dec 16, 2014

Every single version of every single JS engine/browser in existence has both nonzero ES5 and ES6 failures - there doesn't exist an engine that doesn't need both the es5-shim and es6-shim, no matter how evergreen you think you're targeting.

@niemyjski
Copy link
Author

@domenic LOL. Yeah.. I thought they were updating it and I wanted something that worked on our CI / cross plat..

Yeah, I'll bring both of them in..

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