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 babel-register for tests only with node < 8 #841

Merged

Conversation

ronami
Copy link
Contributor

@ronami ronami commented Feb 17, 2018

Hey,

#789 added babel-register before running mocha tests. Using babel-register slows down tests, adds flakiness and it's redundant for Node v8.x.x.

This PR adds babel-regsiter only for when Node's version is <8.

@@ -0,0 +1,3 @@
if (process.version.match(/^v(\d+)\.\d+\.\d+$/)[1] < 8) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better: parseInt(process.versions.node, 10) < 8

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks 👍

@ronami ronami force-pushed the use-babel-register-only-node-6 branch from 781f59c to de4e3ab Compare February 18, 2018 20:52
Copy link
Member

@devongovett devongovett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

@devongovett devongovett merged commit 83d4e3b into parcel-bundler:master Feb 18, 2018
@ronami ronami deleted the use-babel-register-only-node-6 branch February 18, 2018 21:13
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.

None yet

3 participants