question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to test with PhantomJS

See original GitHub issue

Description

We have a Ruby on Rails application with integration tests using Poltergeist (PhantomJS) but we have some incompatibility issues.

One of the issues is that PhantomJS does not support ES6 features like Object.assign, to fix that we added a polyfill and it works.

The point is the following error with Ramda.js:

TypeError: reduce: list must be array or iterable

I don’t know if it is related to lack of ES6 support from PhantomJS and we are unable to find what cause the error but we found that is related to Ramda 😦

My Setup

  • Operating System: Ubuntu 16.04
  • Project Version: 3.1.2
  • NodeJS: 6.11.2
  • PhantomJS: 2.1.1
  • I have tested with the latest version
  • I can simulate the issue easily

Current Behavior

Crashes when tries to run Pagarme-js lib with PhantomJS

Expected Behavior

Run tests using PhantomJS and be able to identify any ES6 feature that is used by Pagarme-js but isn’t supported by PhantomJS or IE11, for example. No problem if we add polyfills to the ES6 features.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
lucasrcdiascommented, Oct 19, 2017

It’s really weird this Ramda error. I’ll try to create the repo!

0reactions
lucasrcdiascommented, Oct 20, 2017

I don’t know if it helps but I searched for reduce in source files and it’s used in:

validations/validate/card/brand.js validations/validate/card/cardNumber.js validations/validate/card/cnpjAndCpf.js -> I didn’t validate cnpj or cpf.

I wanted to help but I’m not familiar with Ramda.js and functional programming 😕

Read more comments on GitHub >

github_iconTop Results From Across the Web

failed to run phantomjs in my tests - javascript - Stack Overflow
When I run cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run fails to run phantomjs, and I see these errors:
Read more >
Troubleshooting - PhantomJS
If the data is not transferred correctly, check if the network works as expected. Since every network request and response can be “sniffed”,...
Read more >
Pipelines Angular 6 TEST error: Failed - Atlassian Community
That error is related to DOM structure/manipulation errors (html) so far i can find info about it (html code/structure issues/errors).
Read more >
Error while testing with PhantomJs, karma and jasmine.
PhantomJS 2.1.1 (Mac OS X 0.0.0) FarmerDistributionComponent should create FAILED Failed: Template parse errors: Binding to event property ...
Read more >
Why Phantomjs got crashed while running more test cases?
PhantomJS notoriously has a lot of memory issues and will crash after a certain amount of memory use. I have dealt with this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found