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

Fix 'padStart is not a function' error in NodeJS 4 and 6 #389

Merged
merged 3 commits into from
Jun 19, 2018

Conversation

lutovich
Copy link
Contributor

This PR upgrades Karma so that it does not polyfill the test scope with ES6 and ES7 features and makes code not use String#padStart() which might not be available in older NodeJS versions.

lutovich added 3 commits June 18, 2018 16:40
Operator type names have changed. This commit makes the assertions
more generic.
Previous Karma version pulled in a polyfill that made it possible to
use ES6 and ES7 features in tests. Such features might not be available
during runtime and could result in errors. `String#padStart()` is an
example of a feature that was used in the code and was added by the
Karma polyfill. Tests worked just fine but driver code failed at
runtime in older NodeJS versions.

Note that Babel runtime that is used by the driver does not polyfill
instance methods such as `String#padStart()`.
It might not be available on older NodeJS and browsers. It can't
be added by the Babel runtime because it is an instance function.
Only Babel polyfill can add such functions and we can't use plyfill
because it changes the global scope.
@zhenlineo zhenlineo merged commit 44f9f5a into neo4j:1.6 Jun 19, 2018
@lutovich lutovich deleted the 1.6-padStart-not-a-function branch June 19, 2018 14:18
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

Successfully merging this pull request may close these issues.

2 participants